ReactOS 0.4.16-dev-1272-g2c12489
appbar.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Explorer
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: AppBar implementation
5 * COPYRIGHT: Copyright 2008 Vincent Povirk for CodeWeavers
6 * Copyright 2025 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
7 */
8
9#include "precomp.h"
10#include "appbar.h"
11
13 : m_hAppBarDPA(NULL)
14 , m_ahwndAutoHideBars { 0 }
15{
16}
17
19{
21}
22
24{
25 if (!m_hAppBarDPA)
26 return NULL;
27
29 while (--nItems >= 0)
30 {
32 if (pAppBar && hwndAppBar == pAppBar->hWnd)
33 return pAppBar;
34 }
35
36 return NULL;
37}
38
40{
43}
44
46{
47 if (!m_hAppBarDPA)
48 return;
49
51 while (--nItems >= 0)
52 {
54 }
55
58}
59
60// ABM_NEW
62{
63 HWND hWnd = (HWND)UlongToHandle(pData->abd.hWnd32);
64
65 if (m_hAppBarDPA)
66 {
67 if (FindAppBar(hWnd))
68 {
69 ERR("Already exists: %p\n", hWnd);
70 return FALSE;
71 }
72 }
73 else
74 {
75 const UINT c_nGrow = 4;
76 m_hAppBarDPA = DPA_Create(c_nGrow);
77 if (!m_hAppBarDPA)
78 {
79 ERR("Out of memory\n");
80 return FALSE;
81 }
82 }
83
84 PAPPBAR pAppBar = (PAPPBAR)::LocalAlloc(LPTR, sizeof(*pAppBar));
85 if (pAppBar)
86 {
87 pAppBar->hWnd = hWnd;
88 pAppBar->uEdge = UINT_MAX;
89 pAppBar->uCallbackMessage = pData->abd.uCallbackMessage;
90 if (DPA_InsertPtr(m_hAppBarDPA, INT_MAX, pAppBar) >= 0)
91 return TRUE; // Success!
92
93 ::LocalFree(pAppBar);
94 }
95
96 ERR("Out of memory\n");
97 return FALSE;
98}
99
100// ABM_REMOVE
102{
103 if (!m_hAppBarDPA)
104 return;
105
106 HWND hWnd = (HWND)UlongToHandle(pData->abd.hWnd32);
108 while (--nItems >= 0)
109 {
111 if (!pAppBar)
112 continue;
113
114 if (pAppBar->hWnd == hWnd)
115 {
116 RECT rcOld = pAppBar->rc;
118 StuckAppChange(hWnd, &rcOld, NULL, FALSE);
119 }
120 }
121}
122
123// ABM_QUERYPOS
125{
126 HWND hWnd = (HWND)UlongToHandle(pData->abd.hWnd32);
127 PAPPBAR pAppBar1 = FindAppBar(hWnd);
128 if (!pAppBar1)
129 {
130 ERR("Not found: %p\n", hWnd);
131 return;
132 }
133
135 if (!pOutput)
136 {
137 ERR("!pOutput: %d\n", pData->dwProcessId);
138 return;
139 }
140 pOutput->rc = pData->abd.rc;
141
142 if (::IsRectEmpty(&pOutput->rc))
143 ERR("IsRectEmpty\n");
144
145 HMONITOR hMon1 = ::MonitorFromRect(&pOutput->rc, MONITOR_DEFAULTTOPRIMARY);
146 ASSERT(hMon1 != NULL);
147
148 // Subtract tray rectangle from pOutput->rc if necessary
149 if (hMon1 == GetMonitor() && !IsAutoHideState())
150 {
151 APPBAR dummyAppBar;
152 dummyAppBar.uEdge = GetPosition();
153 GetDockedRect(&dummyAppBar.rc);
154 AppBarSubtractRect(&dummyAppBar, &pOutput->rc);
155 }
156
157 // Subtract area from pOutput->rc
158 UINT uEdge = pData->abd.uEdge;
160 while (--nItems >= 0)
161 {
163 if (!pAppBar2 || pAppBar1->hWnd == pAppBar2->hWnd)
164 continue;
165
166 if ((Edge_IsVertical(uEdge) || !Edge_IsVertical(pAppBar2->uEdge)) &&
167 (pAppBar1->uEdge != uEdge || !AppBarOutsideOf(pAppBar1, pAppBar2)))
168 {
169 if (pAppBar1->uEdge == uEdge || pAppBar2->uEdge != uEdge)
170 continue;
171 }
172
173 HMONITOR hMon2 = ::MonitorFromRect(&pAppBar2->rc, MONITOR_DEFAULTTONULL);
174 if (hMon1 == hMon2)
175 AppBarSubtractRect(pAppBar2, &pOutput->rc);
176 }
177
178 AppBar_UnLockOutput(pOutput);
179}
180
181// ABM_SETPOS
183{
184 HWND hWnd = (HWND)UlongToHandle(pData->abd.hWnd32);
185 PAPPBAR pAppBar = FindAppBar(hWnd);
186 if (!pAppBar)
187 return;
188
190
192 if (!pOutput)
193 return;
194
195 RECT rcOld = pAppBar->rc, rcNew = pData->abd.rc;
196 BOOL bChanged = !::EqualRect(&rcOld, &rcNew);
197
198 pAppBar->rc = rcNew;
199 pAppBar->uEdge = pData->abd.uEdge;
200
201 AppBar_UnLockOutput(pOutput);
202
203 if (bChanged)
204 StuckAppChange(hWnd, &rcOld, &rcNew, FALSE);
205}
206
208 _In_opt_ HMONITOR hMon,
209 _In_opt_ HWND hwndIgnore,
210 _In_ DWORD dwNotify,
212{
213 TRACE("%p, %p, 0x%X, %p\n", hMon, hwndIgnore, dwNotify, lParam);
214
215 if (!m_hAppBarDPA)
216 return;
217
219 while (--nItems >= 0)
220 {
222 if (!pAppBar || pAppBar->hWnd == hwndIgnore)
223 continue;
224
225 HWND hwndAppBar = pAppBar->hWnd;
226 if (!::IsWindow(hwndAppBar))
227 {
229 continue;
230 }
231
232 if (!hMon || hMon == ::MonitorFromWindow(hwndAppBar, MONITOR_DEFAULTTONULL))
233 ::PostMessageW(hwndAppBar, pAppBar->uCallbackMessage, dwNotify, lParam);
234 }
235}
236
240{
241 switch (pAppBar->uEdge)
242 {
243 case ABE_LEFT: prc->left = max(prc->left, pAppBar->rc.right); break;
244 case ABE_TOP: prc->top = max(prc->top, pAppBar->rc.bottom); break;
245 case ABE_RIGHT: prc->right = min(prc->right, pAppBar->rc.left); break;
246 case ABE_BOTTOM: prc->bottom = min(prc->bottom, pAppBar->rc.top); break;
247 default:
248 ASSERT(FALSE);
249 break;
250 }
251}
252
253// Is pAppBar1 outside of pAppBar2?
255 _In_ const APPBAR *pAppBar1,
256 _In_ const APPBAR *pAppBar2)
257{
258 if (pAppBar1->uEdge != pAppBar2->uEdge)
259 return FALSE;
260
261 switch (pAppBar2->uEdge)
262 {
263 case ABE_LEFT: return pAppBar1->rc.left >= pAppBar2->rc.left;
264 case ABE_TOP: return pAppBar1->rc.top >= pAppBar2->rc.top;
265 case ABE_RIGHT: return pAppBar1->rc.right <= pAppBar2->rc.right;
266 case ABE_BOTTOM: return pAppBar1->rc.bottom <= pAppBar2->rc.bottom;
267 default:
268 ASSERT(FALSE);
269 return FALSE;
270 }
271}
272
276{
277 *prcDocked = *GetTrayRect();
279 ComputeHiddenRect(prcDocked, GetPosition());
280}
281
286{
287 MONITORINFO mi = { sizeof(mi) };
288 HMONITOR hMonitor = ::MonitorFromRect(prc, MONITOR_DEFAULTTONULL);
289 if (!::GetMonitorInfoW(hMonitor, &mi))
290 return;
291 RECT rcMon = mi.rcMonitor;
292
293 INT cxy = Edge_IsVertical(uSide) ? (prc->bottom - prc->top) : (prc->right - prc->left);
294 switch (uSide)
295 {
296 case ABE_LEFT:
297 prc->right = rcMon.left + GetSystemMetrics(SM_CXFRAME) / 2;
298 prc->left = prc->right - cxy;
299 break;
300 case ABE_TOP:
301 prc->bottom = rcMon.top + GetSystemMetrics(SM_CYFRAME) / 2;
302 prc->top = prc->bottom - cxy;
303 break;
304 case ABE_RIGHT:
305 prc->left = rcMon.right - GetSystemMetrics(SM_CXFRAME) / 2;
306 prc->right = prc->left + cxy;
307 break;
308 case ABE_BOTTOM:
309 prc->top = rcMon.bottom - GetSystemMetrics(SM_CYFRAME) / 2;
310 prc->bottom = prc->top + cxy;
311 break;
312 default:
313 ASSERT(FALSE);
314 break;
315 }
316}
317
323void
325 _In_opt_ HWND hwndTarget,
326 _In_opt_ const RECT *prcOld,
327 _In_opt_ const RECT *prcNew,
328 _In_ BOOL bTray)
329{
330 RECT rcWorkArea1, rcWorkArea2;
331 HMONITOR hMon1 = NULL;
332 UINT flags = 0;
333 enum { SET_WORKAREA_1 = 1, SET_WORKAREA_2 = 2, NEED_SIZING = 4 }; // for flags
334
335 if (prcOld)
336 {
337 hMon1 = (bTray ? GetPreviousMonitor() : ::MonitorFromRect(prcOld, MONITOR_DEFAULTTONEAREST));
338 if (hMon1)
339 {
340 WORKAREA_TYPE type1 = RecomputeWorkArea(GetTrayRect(), hMon1, &rcWorkArea1);
341 if (type1 == WORKAREA_IS_NOT_MONITOR)
342 flags = SET_WORKAREA_1;
343 if (type1 == WORKAREA_SAME_AS_MONITOR)
344 flags = NEED_SIZING;
345 }
346 }
347
348 if (prcNew)
349 {
350 HMONITOR hMon2 = ::MonitorFromRect(prcNew, MONITOR_DEFAULTTONULL);
351 if (hMon2 && hMon2 != hMon1)
352 {
353 WORKAREA_TYPE type2 = RecomputeWorkArea(GetTrayRect(), hMon2, &rcWorkArea2);
354 if (type2 == WORKAREA_IS_NOT_MONITOR)
355 flags |= SET_WORKAREA_2;
356 else if (type2 == WORKAREA_SAME_AS_MONITOR && !flags)
357 flags = NEED_SIZING;
358 }
359 }
360
361 if (flags & SET_WORKAREA_1)
362 {
363 UINT fWinIni = ((flags == SET_WORKAREA_1 && GetDesktopWnd()) ? SPIF_SENDCHANGE : 0);
364 ::SystemParametersInfoW(SPI_SETWORKAREA, TRUE, &rcWorkArea1, fWinIni);
365 RedrawDesktop(GetDesktopWnd(), &rcWorkArea1);
366 }
367
368 if (flags & SET_WORKAREA_2)
369 {
370 UINT fWinIni = (GetDesktopWnd() ? SPIF_SENDCHANGE : 0);
371 ::SystemParametersInfoW(SPI_SETWORKAREA, TRUE, &rcWorkArea2, fWinIni);
372 RedrawDesktop(GetDesktopWnd(), &rcWorkArea2);
373 }
374
375 if (bTray || flags == NEED_SIZING)
377
378 // Post ABN_POSCHANGED messages to AppBar windows
380}
381
383{
384 if (!hwndDesktop)
385 return;
386 ::MapWindowPoints(NULL, hwndDesktop, (POINT*)prc, sizeof(*prc) / sizeof(POINT));
388}
389
396 _In_ const RECT *prcTray,
397 _In_ HMONITOR hMonitor,
398 _Out_ PRECT prcWorkArea)
399{
400 MONITORINFO mi = { sizeof(mi) };
401 if (!::GetMonitorInfoW(hMonitor, &mi))
403
404 if (IsAutoHideState())
405 *prcWorkArea = mi.rcMonitor;
406 else
407 ::SubtractRect(prcWorkArea, &mi.rcMonitor, prcTray);
408
409 if (m_hAppBarDPA)
410 {
412 while (--nItems >= 0)
413 {
415 if (pAppBar && hMonitor == ::MonitorFromRect(&pAppBar->rc, MONITOR_DEFAULTTONULL))
416 AppBarSubtractRect(pAppBar, prcWorkArea);
417 }
418 }
419
420 if (!::EqualRect(prcWorkArea, &mi.rcWork))
422
423 if (IsAutoHideState() || ::IsRectEmpty(prcTray))
425
427}
428
431 _In_ HMONITOR hMonitor,
432 _In_ HDC hDC,
435{
438
439 RECT rcWorkArea;
440 if (pThis->RecomputeWorkArea(prc, hMonitor, &rcWorkArea) != WORKAREA_IS_NOT_MONITOR)
441 return TRUE;
442
443 HWND hwndDesktop = pThis->GetDesktopWnd();
444 ::SystemParametersInfoW(SPI_SETWORKAREA, 0, &rcWorkArea, hwndDesktop ? SPIF_SENDCHANGE : 0);
445 pThis->RedrawDesktop(hwndDesktop, &rcWorkArea);
446 return TRUE;
447}
448
450{
452}
453
455{
457 HWND *phwndAutoHide = &m_ahwndAutoHideBars[uSide];
458 if (!IsWindow(*phwndAutoHide))
459 *phwndAutoHide = NULL;
460
461 if (bSetOrReset) // Set?
462 {
463 if (!*phwndAutoHide)
464 *phwndAutoHide = hwndTarget;
465 return *phwndAutoHide == hwndTarget;
466 }
467 else // Reset
468 {
469 if (*phwndAutoHide == hwndTarget)
470 *phwndAutoHide = NULL;
471 return TRUE;
472 }
473}
474
476{
477 HWND hwndAutoHideBar = OnAppBarGetAutoHideBar(uSide);
478 if (hwndAutoHideBar && hwndAutoHideBar != hwndNewAutoHide)
479 ::PostMessageW(GetTrayWnd(), TWM_SETZORDER, (WPARAM)hwndAutoHideBar, uSide);
480}
481
484{
485 PAPPBAR_COMMAND pData = (PAPPBAR_COMMAND)pCopyData->lpData;
486
487 if (pCopyData->cbData != sizeof(*pData) || pData->abd.cbSize != sizeof(pData->abd))
488 {
489 ERR("Invalid AppBar message\n");
490 return NULL;
491 }
492
493 return pData;
494}
495
496// ABM_GETSTATE
498{
499 return (IsAutoHideState() ? ABS_AUTOHIDE : 0) | (IsAlwaysOnTop() ? ABS_ALWAYSONTOP : 0);
500}
501
502// ABM_GETTASKBARPOS
504{
506 if (!pOutput)
507 {
508 ERR("!pOutput: %d\n", pData->dwProcessId);
509 return FALSE;
510 }
511
512 pOutput->rc = *GetTrayRect();
513 pOutput->uEdge = GetPosition();
514
515 AppBar_UnLockOutput(pOutput);
516 return TRUE;
517}
518
519// ABM_ACTIVATE, ABM_WINDOWPOSCHANGED
521{
522 HWND hWnd = (HWND)UlongToHandle(pData->abd.hWnd32);
523 PAPPBAR pAppBar = FindAppBar(hWnd);
524 if (!pAppBar)
525 {
526 ERR("Not found: %p\n", hWnd);
527 return;
528 }
529
530 HWND hwndAppBar = pAppBar->hWnd;
531 for (UINT uSide = ABE_LEFT; uSide <= ABE_BOTTOM; ++uSide)
532 {
533 if (m_ahwndAutoHideBars[uSide] == hwndAppBar && uSide != pAppBar->uEdge)
534 return;
535 }
536
537 OnAppBarActivationChange2(hwndAppBar, pAppBar->uEdge);
538}
539
540// ABM_GETAUTOHIDEBAR
542{
543 if (uSide >= _countof(m_ahwndAutoHideBars))
544 return NULL;
545
546 if (!::IsWindow(m_ahwndAutoHideBars[uSide]))
547 m_ahwndAutoHideBars[uSide] = NULL;
548 return m_ahwndAutoHideBars[uSide];
549}
550
551// ABM_SETAUTOHIDEBAR
553{
554 if (pData->abd.uEdge >= _countof(m_ahwndAutoHideBars))
555 return FALSE;
556 HWND hwndTarget = (HWND)UlongToHandle(pData->abd.hWnd32);
557 return SetAutoHideBar(hwndTarget, (BOOL)pData->abd.lParam64, pData->abd.uEdge);
558}
559
560// ABM_SETSTATE
562{
563 if ((uState & ~(ABS_AUTOHIDE | ABS_ALWAYSONTOP)))
564 return;
565
566 SetAutoHideState(!!(uState & ABS_AUTOHIDE));
568}
569
570// WM_COPYDATA TABDMC_APPBAR
572{
574 if (!pData)
575 return 0;
576
577 switch (pData->dwMessage)
578 {
579 case ABM_NEW:
580 return OnAppBarNew(pData);
581 case ABM_REMOVE:
583 break;
584 case ABM_QUERYPOS:
586 break;
587 case ABM_SETPOS:
589 break;
590 case ABM_GETSTATE:
591 return OnAppBarGetState();
594 case ABM_ACTIVATE:
597 break;
599 return (LRESULT)OnAppBarGetAutoHideBar(pData->abd.uEdge);
602 case ABM_SETSTATE:
603 OnAppBarSetState((UINT)pData->abd.lParam64);
604 break;
605 default:
606 {
607 FIXME("0x%X\n", pData->dwMessage);
608 return FALSE;
609 }
610 }
611 return TRUE;
612}
static HDC hDC
Definition: 3dtext.c:33
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
static BOOL Edge_IsVertical(_In_ UINT uEdge)
Definition: appbar.h:31
static PAPPBARDATAINTEROP AppBar_LockOutput(_In_ PAPPBAR_COMMAND pData)
Definition: appbar.h:19
WORKAREA_TYPE
Definition: appbar.h:38
@ WORKAREA_IS_NOT_MONITOR
Definition: appbar.h:40
@ WORKAREA_SAME_AS_MONITOR
Definition: appbar.h:41
@ WORKAREA_NO_TRAY_AREA
Definition: appbar.h:39
static VOID AppBar_UnLockOutput(_Out_ PAPPBARDATAINTEROP pOutput)
Definition: appbar.h:25
struct tagAPPBAR * PAPPBAR
int nItems
Definition: appswitch.c:55
HWND hWnd
Definition: settings.c:17
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
#define TWM_SETZORDER
Definition: precomp.h:135
#define UlongToHandle(ul)
Definition: basetsd.h:97
BOOL OnAppBarGetTaskbarPos(_Inout_ PAPPBAR_COMMAND pData)
Definition: appbar.cpp:503
void AppBarSubtractRect(_In_ PAPPBAR pAppBar, _Inout_ PRECT prc)
Definition: appbar.cpp:239
virtual HWND GetTrayWnd() const =0
void EliminateAppBar(_In_ INT iItem)
Definition: appbar.cpp:39
HDPA m_hAppBarDPA
Definition: appbar.h:53
void ComputeHiddenRect(_Inout_ PRECT prc, _In_ UINT uSide)
Definition: appbar.cpp:285
void OnAppBarRemove(_In_ const APPBAR_COMMAND *pData)
Definition: appbar.cpp:101
virtual void UpdateAlwaysOnTop(_In_ BOOL bAlwaysOnTop)=0
void OnAppBarSetState(_In_ UINT uState)
Definition: appbar.cpp:561
HWND OnAppBarGetAutoHideBar(_In_ UINT uSide)
Definition: appbar.cpp:541
HWND m_ahwndAutoHideBars[4]
Definition: appbar.h:54
void OnAppBarActivationChange(_In_ const APPBAR_COMMAND *pData)
Definition: appbar.cpp:520
static BOOL CALLBACK MonitorEnumProc(_In_ HMONITOR hMonitor, _In_ HDC hDC, _In_ LPRECT prc, _Inout_ LPARAM lParam)
Definition: appbar.cpp:430
virtual BOOL IsAutoHideState() const =0
virtual BOOL IsAlwaysOnTop() const =0
void DestroyAppBarDPA()
Definition: appbar.cpp:45
void StuckAppChange(_In_opt_ HWND hwndTarget, _In_opt_ const RECT *prcOld, _In_opt_ const RECT *prcNew, _In_ BOOL bTray)
Definition: appbar.cpp:324
void OnAppBarSetPos(_Inout_ PAPPBAR_COMMAND pData)
Definition: appbar.cpp:182
PAPPBAR FindAppBar(_In_ HWND hwndAppBar) const
Definition: appbar.cpp:23
BOOL OnAppBarSetAutoHideBar(_In_ const APPBAR_COMMAND *pData)
Definition: appbar.cpp:552
virtual void SetAutoHideState(_In_ BOOL bAutoHide)=0
void OnAppBarActivationChange2(_In_ HWND hwndNewAutoHide, _In_ UINT uSide)
Definition: appbar.cpp:475
BOOL AppBarOutsideOf(_In_ const APPBAR *pAppBar1, _In_ const APPBAR *pAppBar2)
Definition: appbar.cpp:254
void GetDockedRect(_Out_ PRECT prcDocked)
Definition: appbar.cpp:275
BOOL SetAutoHideBar(_In_ HWND hwndTarget, _In_ BOOL bSetOrReset, _In_ UINT uSide)
Definition: appbar.cpp:454
virtual const RECT * GetTrayRect()=0
void OnAppBarNotifyAll(_In_opt_ HMONITOR hMon, _In_opt_ HWND hwndIgnore, _In_ DWORD dwNotify, _In_opt_ LPARAM lParam)
Definition: appbar.cpp:207
void RecomputeAllWorkareas()
Definition: appbar.cpp:449
virtual INT GetPosition() const =0
virtual HMONITOR & GetMonitor()=0
virtual BOOL IsHidingState() const =0
virtual ~CAppBarManager()
Definition: appbar.cpp:18
PAPPBAR_COMMAND GetAppBarMessage(_Inout_ PCOPYDATASTRUCT pCopyData)
Definition: appbar.cpp:483
virtual HWND GetDesktopWnd() const =0
void OnAppBarQueryPos(_Inout_ PAPPBAR_COMMAND pData)
Definition: appbar.cpp:124
WORKAREA_TYPE RecomputeWorkArea(_In_ const RECT *prcTray, _In_ HMONITOR hMonitor, _Out_ PRECT prcWorkArea)
Definition: appbar.cpp:395
virtual HMONITOR & GetPreviousMonitor()=0
void RedrawDesktop(_In_ HWND hwndDesktop, _Inout_ PRECT prc)
Definition: appbar.cpp:382
LRESULT OnAppBarMessage(_Inout_ PCOPYDATASTRUCT pCopyData)
Definition: appbar.cpp:571
BOOL OnAppBarNew(_In_ const APPBAR_COMMAND *pData)
Definition: appbar.cpp:61
UINT OnAppBarGetState()
Definition: appbar.cpp:497
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LPVOID WINAPI DPA_DeletePtr(HDPA hdpa, INT i)
Definition: dpa.c:677
BOOL WINAPI DPA_Destroy(HDPA hdpa)
Definition: dpa.c:396
HDPA WINAPI DPA_Create(INT nGrow)
Definition: dpa.c:950
INT WINAPI DPA_InsertPtr(HDPA hdpa, INT i, LPVOID p)
Definition: dpa.c:591
HANDLE HWND
Definition: compat.h:19
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1390
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
#define INT_MAX
Definition: intsafe.h:150
#define UINT_MAX
Definition: intsafe.h:152
if(dx< 0)
Definition: linetemp.h:194
#define ASSERT(a)
Definition: mode.c:44
static HDC
Definition: imagelist.c:88
static MONITORINFO mi
Definition: win.c:7338
#define min(a, b)
Definition: monoChain.cc:55
HMONITOR WINAPI MonitorFromRect(LPCRECT, DWORD)
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
unsigned int UINT
Definition: ndis.h:50
#define _Inout_
Definition: no_sal2.h:162
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
_Out_ LPRECT prc
Definition: ntgdi.h:1658
#define DPA_GetPtrCount(hdpa)
Definition: commctrl.h:4960
#define DPA_GetPtr
Definition: commctrl.h:5
#define ABM_WINDOWPOSCHANGED
Definition: shellapi.h:70
#define ABE_BOTTOM
Definition: shellapi.h:20
#define ABM_GETTASKBARPOS
Definition: shellapi.h:66
#define ABM_GETSTATE
Definition: shellapi.h:65
#define ABM_SETAUTOHIDEBAR
Definition: shellapi.h:69
#define ABE_RIGHT
Definition: shellapi.h:19
#define ABE_TOP
Definition: shellapi.h:18
#define ABM_SETSTATE
Definition: shellapi.h:71
#define ABM_SETPOS
Definition: shellapi.h:64
#define ABM_ACTIVATE
Definition: shellapi.h:67
#define ABE_LEFT
Definition: shellapi.h:17
#define ABS_ALWAYSONTOP
Definition: shellapi.h:22
#define ABM_REMOVE
Definition: shellapi.h:62
#define ABS_AUTOHIDE
Definition: shellapi.h:21
#define ABM_NEW
Definition: shellapi.h:61
#define ABM_GETAUTOHIDEBAR
Definition: shellapi.h:68
#define ABN_POSCHANGED
Definition: shellapi.h:73
#define ABM_QUERYPOS
Definition: shellapi.h:63
#define _countof(array)
Definition: sndvol32.h:70
#define TRACE(s)
Definition: solgame.cpp:4
UINT uEdge
Definition: appbar.h:14
RECT rc
Definition: appbar.h:15
HWND hWnd
Definition: appbar.h:12
UINT uCallbackMessage
Definition: appbar.h:13
RECT rcMonitor
Definition: winuser.h:3861
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define max(a, b)
Definition: svc.c:63
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
int32_t INT
Definition: typedefs.h:58
struct tagAPPBAR_COMMAND * PAPPBAR_COMMAND
#define LPTR
Definition: winbase.h:414
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
BOOL WINAPI IsWindow(_In_opt_ HWND)
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_SIZE
Definition: winuser.h:1630
#define SM_CXFRAME
Definition: winuser.h:1005
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
BOOL WINAPI EnumDisplayMonitors(_In_opt_ HDC, _In_opt_ LPCRECT, _In_ MONITORENUMPROC, _In_ LPARAM)
#define RDW_ERASE
Definition: winuser.h:1222
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define SM_CYFRAME
Definition: winuser.h:1007
#define SPIF_SENDCHANGE
Definition: winuser.h:1591
#define RDW_ALLCHILDREN
Definition: winuser.h:1232
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
int WINAPI GetSystemMetrics(_In_ int)
#define RDW_INVALIDATE
Definition: winuser.h:1225
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SubtractRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)