ReactOS  0.4.15-dev-1201-gb2cf5a4
SHAppBarMessage.cpp
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS api tests
3  * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4  * PURPOSE: Test for SHAppBarMessage
5  * COPYRIGHT: Copyright 2020 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
6  */
7 
8 #include "shelltest.h"
9 #include <windowsx.h>
10 #include <shlwapi.h>
11 #include <stdio.h>
12 
13 /* Based on https://github.com/katahiromz/AppBarSample */
14 
15 //#define VERBOSE
16 
17 #define IDT_AUTOHIDE 1
18 #define IDT_AUTOUNHIDE 2
19 
20 #define ID_ACTION 100
21 
22 #define APPBAR_CALLBACK (WM_USER + 100)
23 
24 #define LEFT_DOWN() mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
25 #define LEFT_UP() mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
26 #define MOVE(x, y) SetCursorPos((x), (y))
27 
28 static const TCHAR s_szName[] = TEXT("AppBarSample");
30 static HWND s_hwnd1 = NULL;
31 static HWND s_hwnd2 = NULL;
32 
33 #ifdef VERBOSE
34 static LPCSTR MessageOfAppBar(DWORD dwMessage)
35 {
36  static char s_buf[32];
37  switch (dwMessage)
38  {
39  case ABM_NEW: return "ABM_NEW";
40  case ABM_REMOVE: return "ABM_REMOVE";
41  case ABM_QUERYPOS: return "ABM_QUERYPOS";
42  case ABM_SETPOS: return "ABM_SETPOS";
43  case ABM_GETSTATE: return "ABM_GETSTATE";
44  case ABM_GETTASKBARPOS: return "ABM_GETTASKBARPOS";
45  case ABM_ACTIVATE: return "ABM_ACTIVATE";
46  case ABM_GETAUTOHIDEBAR: return "ABM_GETAUTOHIDEBAR";
47  case ABM_SETAUTOHIDEBAR: return "ABM_SETAUTOHIDEBAR";
48  case ABM_WINDOWPOSCHANGED: return "ABM_WINDOWPOSCHANGED";
49  }
50  wsprintfA(s_buf, "%lu", dwMessage);
51  return s_buf;
52 }
53 
54 static UINT WINAPI
55 SHAppBarMessageWrap(DWORD dwMessage, PAPPBARDATA pData)
56 {
57  trace("SHAppBarMessage entered (dwMessage=%s, rc=(%ld, %ld, %ld, %ld))\n",
58  MessageOfAppBar(dwMessage),
59  pData->rc.left, pData->rc.top, pData->rc.right, pData->rc.bottom);
60  UINT ret = SHAppBarMessage(dwMessage, pData);
61  trace("SHAppBarMessage leaved (dwMessage=%s, rc=(%ld, %ld, %ld, %ld))\n",
62  MessageOfAppBar(dwMessage),
63  pData->rc.left, pData->rc.top, pData->rc.right, pData->rc.bottom);
64  return ret;
65 }
66 #define SHAppBarMessage SHAppBarMessageWrap
67 
68 #undef ARRAYSIZE
69 #define ARRAYSIZE _countof
70 
71 void appbar_tprintf(const TCHAR *fmt, ...)
72 {
73  TCHAR szText[512];
74  va_list va;
75  va_start(va, fmt);
76  wvsprintf(szText, fmt, va);
77 #ifdef UNICODE
78  printf("%ls", szText);
79 #else
80  printf("%s", szText);
81 #endif
82  va_end(va);
83 }
84 
85 #define MSGDUMP_TPRINTF appbar_tprintf
86 #include "msgdump.h"
87 
88 #endif // def VERBOSE
89 
91 {
92 #define SLIDE_HIDE 400
93 #define SLIDE_SHOW 150
94  RECT rcOld, rcNew = *prc;
95  GetWindowRect(hwnd, &rcOld);
96 
97  BOOL fShow = (rcNew.bottom - rcNew.top > rcOld.bottom - rcOld.top) ||
98  (rcNew.right - rcNew.left > rcOld.right - rcOld.left);
99 
100  INT dx = (rcNew.right - rcOld.right) + (rcNew.left - rcOld.left);
101  INT dy = (rcNew.bottom - rcOld.bottom) + (rcNew.top - rcOld.top);
102 
103  LONG dt = SLIDE_HIDE;
104  if (fShow)
105  {
106  dt = SLIDE_SHOW;
107  rcOld = rcNew;
108  OffsetRect(&rcOld, -dx, -dy);
109  SetWindowPos(hwnd, NULL, rcOld.left, rcOld.top,
110  rcOld.right - rcOld.left, rcOld.bottom - rcOld.top,
112  }
113 
117 
118  LONG t, t0 = GetTickCount();
119  while ((t = GetTickCount()) < t0 + dt)
120  {
121  INT x = rcOld.left + dx * (t - t0) / dt;
122  INT y = rcOld.top + dy * (t - t0) / dt;
124 
127  }
128 
130  SetWindowPos(hwnd, NULL, rcNew.left, rcNew.top,
131  rcNew.right - rcNew.left, rcNew.bottom - rcNew.top,
133 #undef SLIDE_HIDE
134 #undef SLIDE_SHOW
135 }
136 
137 class Window
138 {
139 public:
140  Window(INT cx, INT cy, BOOL fAutoHide = FALSE)
141  : m_hwnd(NULL)
142  , m_fAutoHide(fAutoHide)
143  , m_cxWidth(cx)
144  , m_cyHeight(cy)
145  {
146  }
147 
148  virtual ~Window()
149  {
150  }
151 
153  {
154  WNDCLASS wc;
155  ZeroMemory(&wc, sizeof(wc));
157  wc.hInstance = hInstance;
160  wc.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
161  wc.lpszClassName = s_szName;
162  return !!RegisterClass(&wc);
163  }
164 
168  BOOL fAutoHide = FALSE)
169  {
170  Window *this_ = new Window(cx, cy, fAutoHide);
171  HWND hwnd = CreateWindowEx(exstyle, s_szName, pszText, style,
172  CW_USEDEFAULT, CW_USEDEFAULT, 50, 50,
173  NULL, NULL, hInstance, this_);
176  return hwnd;
177  }
178 
179  static INT DoMainLoop()
180  {
181  MSG msg;
182  while (GetMessage(&msg, NULL, 0, 0))
183  {
186  }
187  return (INT)msg.wParam;
188  }
189 
191  {
193  }
194 
195  virtual LRESULT CALLBACK
197  {
198 #ifdef VERBOSE
199  MD_msgdump(hwnd, uMsg, wParam, lParam);
200 #endif
201  switch (uMsg)
202  {
218 
219  case APPBAR_CALLBACK:
221  break;
222 
223  default:
224  return DefWindowProc(hwnd, uMsg, wParam, lParam);
225  }
226  return 0;
227  }
228 
229  static LRESULT CALLBACK
231  {
232  Window *this_ = GetAppbarData(hwnd);
233  if (uMsg == WM_CREATE)
234  {
236  this_ = (Window *)pCS->lpCreateParams;
238  }
239  if (this_)
240  return this_->WindowProcDx(hwnd, uMsg, wParam, lParam);
241  return DefWindowProc(hwnd, uMsg, wParam, lParam);
242  }
243 
244 protected:
260 
261  void OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
262  {
263  HANDLE hThread;
264  switch (id)
265  {
266  case ID_ACTION:
268  break;
269  case ID_ACTION + 1:
270  hThread = CreateThread(NULL, 0, ActionThreadFunc, this, 0, NULL);
271  if (!hThread)
272  {
273  skip("failed to create thread\n");
274  PostMessage(s_hwnd1, WM_CLOSE, 0, 0);
275  PostMessage(s_hwnd2, WM_CLOSE, 0, 0);
276  return;
277  }
279  }
280  }
281 
283  {
284  PAINTSTRUCT ps;
285 
286  TCHAR szText[64];
287  GetWindowText(hwnd, szText, 64);
288 
289  RECT rc;
290  GetClientRect(hwnd, &rc);
291 
292  if (HDC hdc = BeginPaint(hwnd, &ps))
293  {
295  EndPaint(hwnd, &ps);
296  }
297  }
298 
299  void OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
300  {
303  }
304 
305  void OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags)
306  {
307  if (vk == VK_ESCAPE)
309  }
310 
312  {
313  static HWND s_hwndZOrder = NULL;
314 
315  switch (wParam)
316  {
317  case ABN_STATECHANGE:
318  break;
319 
320  case ABN_FULLSCREENAPP:
321  if (lParam)
322  {
323  s_hwndZOrder = GetWindow(hwnd, GW_HWNDPREV);
324  SetWindowPos(hwnd, HWND_BOTTOM, 0, 0, 0, 0,
326  }
327  else
328  {
329  SetWindowPos(hwnd, m_fOnTop ? HWND_TOPMOST : s_hwndZOrder,
330  0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
331  s_hwndZOrder = NULL;
332  }
333  break;
334 
335  case ABN_POSCHANGED:
336  {
337  APPBARDATA abd = { sizeof(abd) };
338  abd.hWnd = hwnd;
339  AppBar_PosChanged(&abd);
340  }
341  break;
342  }
343  }
344 
346  {
347  APPBARDATA abd = { sizeof(abd) };
348  abd.hWnd = hwnd;
350 
352  return m_fAppBarRegd;
353  }
354 
356  {
357  APPBARDATA abd = { sizeof(abd) };
358  abd.hWnd = hwnd;
359 
361  return !m_fAppBarRegd;
362  }
363 
365  {
366  if (fHide)
367  return AppBar_AutoHide(hwnd);
368  else
369  return AppBar_NoAutoHide(hwnd);
370  }
371 
373  {
374  APPBARDATA abd = { sizeof(abd) };
375  abd.hWnd = hwnd;
376  abd.uEdge = m_uSide;
377 
378  HWND hwndAutoHide = (HWND)SHAppBarMessage(ABM_GETAUTOHIDEBAR, &abd);
379  if (hwndAutoHide)
380  return FALSE;
381 
382  abd.lParam = TRUE;
384  return FALSE;
385 
386  m_fAutoHide = TRUE;
389 
390  RECT rc = m_rcAppBar;
391  switch (m_uSide)
392  {
393  case ABE_TOP:
394  rc.bottom = rc.top + 2;
395  break;
396  case ABE_BOTTOM:
397  rc.top = rc.bottom - 2;
398  break;
399  case ABE_LEFT:
400  rc.right = rc.left + 2;
401  break;
402  case ABE_RIGHT:
403  rc.left = rc.right - 2;
404  break;
405  }
406 
407  AppBar_QueryPos(hwnd, &rc);
408  abd.rc = rc;
410  rc = abd.rc;
411 
412  m_fHiding = TRUE;
413  SlideWindow(hwnd, &rc);
414 
416  return TRUE;
417  }
418 
420  {
421  APPBARDATA abd = { sizeof(abd) };
422  abd.hWnd = hwnd;
423  abd.uEdge = m_uSide;
424  HWND hwndAutoHide = (HWND)SHAppBarMessage(ABM_GETAUTOHIDEBAR, &abd);
425  if (hwndAutoHide != hwnd)
426  return FALSE;
427 
428  abd.lParam = FALSE;
430  return FALSE;
431 
432  m_fAutoHide = FALSE;
436  return TRUE;
437  }
438 
440  {
441  RECT rc;
443 
444  BOOL fAutoHide = FALSE;
445  if (m_fAutoHide)
446  {
447  fAutoHide = m_fAutoHide;
450  m_fHiding = FALSE;
451  }
452 
453  switch (uSide)
454  {
455  case ABE_TOP:
456  rc.bottom = rc.top + m_cyHeight;
457  break;
458  case ABE_BOTTOM:
459  rc.top = rc.bottom - m_cyHeight;
460  break;
461  case ABE_LEFT:
462  rc.right = rc.left + m_cxWidth;
463  break;
464  case ABE_RIGHT:
465  rc.left = rc.right - m_cxWidth;
466  break;
467  }
468 
469  APPBARDATA abd = { sizeof(abd) };
470  abd.hWnd = hwnd;
471  AppBar_QuerySetPos(uSide, &rc, &abd, TRUE);
472 
473  if (fAutoHide)
474  {
476  m_fHiding = TRUE;
477 
481  }
482 
483  return TRUE;
484  }
485 
487  {
489  0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
490  m_fOnTop = fOnTop;
491  }
492 
494  {
495  if (!m_fAutoHide)
496  return;
497 
498  RECT rc = m_rcAppBar;
499  switch (m_uSide)
500  {
501  case ABE_TOP:
502  rc.bottom = rc.top + 2;
503  break;
504  case ABE_BOTTOM:
505  rc.top = rc.bottom - 2;
506  break;
507  case ABE_LEFT:
508  rc.right = rc.left + 2;
509  break;
510  case ABE_RIGHT:
511  rc.left = rc.right - 2;
512  break;
513  }
514 
515  m_fHiding = TRUE;
516  SlideWindow(hwnd, &rc);
517  }
518 
520  {
522  m_fHiding = FALSE;
523 
525  }
526 
528  {
529  if (m_fAutoHide)
530  {
531  SetTimer(hwnd, IDT_AUTOHIDE, 500, NULL);
532  }
533  }
534 
536  {
537  if (m_fAutoHide && m_fHiding)
538  {
540  }
541  }
542 
544  {
545  if (m_fAppBarRegd)
546  {
547  APPBARDATA abd = { sizeof(abd) };
548  abd.hWnd = hwnd;
549 
550  RECT rc;
551  GetWindowRect(hwnd, &rc);
552  AppBar_QuerySetPos(m_uSide, &rc, &abd, TRUE);
553  }
554  }
555 
557  {
558  APPBARDATA abd = { sizeof(abd) };
559  abd.hWnd = hwnd;
560  abd.rc = *lprc;
561  abd.uEdge = m_uSide;
562 
563  INT cx = 0, cy = 0;
564  if (ABE_LEFT == abd.uEdge || ABE_RIGHT == abd.uEdge)
565  {
566  cx = abd.rc.right - abd.rc.left;
567  abd.rc.top = 0;
569  }
570  else
571  {
572  cy = abd.rc.bottom - abd.rc.top;
573  abd.rc.left = 0;
575  }
576 
578 
579  switch (abd.uEdge)
580  {
581  case ABE_LEFT:
582  abd.rc.right = abd.rc.left + cx;
583  break;
584  case ABE_RIGHT:
585  abd.rc.left = abd.rc.right - cx;
586  break;
587  case ABE_TOP:
588  abd.rc.bottom = abd.rc.top + cy;
589  break;
590  case ABE_BOTTOM:
591  abd.rc.top = abd.rc.bottom - cy;
592  break;
593  }
594 
595  *lprc = abd.rc;
596  }
597 
598  void AppBar_QuerySetPos(UINT uEdge, LPRECT lprc, PAPPBARDATA pabd, BOOL fMove)
599  {
600  pabd->rc = *lprc;
601  pabd->uEdge = uEdge;
602  m_uSide = uEdge;
603 
604  AppBar_QueryPos(pabd->hWnd, &pabd->rc);
605 
607 
608  if (fMove)
609  {
610  RECT rc = pabd->rc;
611  MoveWindow(pabd->hWnd, rc.left, rc.top,
612  rc.right - rc.left, rc.bottom - rc.top, TRUE);
613  }
614 
615  if (!m_fAutoHide)
616  {
617  m_rcAppBar = pabd->rc;
618  }
619  }
620 
622  {
623  RECT rc;
625 
626  if (m_fAutoHide)
627  {
628  m_rcAppBar = rc;
629  switch (m_uSide)
630  {
631  case ABE_TOP:
633  break;
634  case ABE_BOTTOM:
636  break;
637  case ABE_LEFT:
639  break;
640  case ABE_RIGHT:
642  break;
643  }
644  }
645 
646  RECT rcWindow;
647  GetWindowRect(pabd->hWnd, &rcWindow);
648  INT cx = rcWindow.right - rcWindow.left;
649  INT cy = rcWindow.bottom - rcWindow.top;
650  switch (m_uSide)
651  {
652  case ABE_TOP:
653  rc.bottom = rc.top + cy;
654  break;
655  case ABE_BOTTOM:
656  rc.top = rc.bottom - cy;
657  break;
658  case ABE_LEFT:
659  rc.right = rc.left + cx;
660  break;
661  case ABE_RIGHT:
662  rc.left = rc.right - cx;
663  break;
664  }
665  AppBar_QuerySetPos(m_uSide, &rc, pabd, TRUE);
666  }
667 
669  {
670  m_hwnd = hwnd;
671  m_fOnTop = TRUE;
672  m_uSide = ABE_TOP;
673 
675  m_fMoving = FALSE;
678  m_bDragged = FALSE;
679 
682 
683  return TRUE;
684  }
685 
686  void OnActivate(HWND hwnd, UINT state, HWND hwndActDeact, BOOL fMinimized)
687  {
688  APPBARDATA abd = { sizeof(abd) };
689  abd.hWnd = hwnd;
691 
692  switch (state)
693  {
694  case WA_ACTIVE:
695  case WA_CLICKACTIVE:
698  break;
699 
700  case WA_INACTIVE:
701  AppBar_Hide(hwnd);
702  break;
703  }
704  }
705 
707  {
708  APPBARDATA abd = { sizeof(abd) };
709  abd.hWnd = hwnd;
711 
713  }
714 
715  void OnSize(HWND hwnd, UINT state, int cx, int cy)
716  {
717  RECT rcWindow;
718 
719  if (m_fMoving || (m_fAutoHide && m_fHiding))
720  return;
721 
722  if (!m_fHiding)
723  {
724  if (!m_fAutoHide)
725  AppBar_Size(hwnd);
726 
727  GetWindowRect(hwnd, &rcWindow);
728  m_rcAppBar = rcWindow;
729 
730  if (m_uSide == ABE_TOP || m_uSide == ABE_BOTTOM)
731  {
732  m_cyHeight = m_cySave = rcWindow.bottom - rcWindow.top;
733  }
734  else
735  {
736  m_cxWidth = m_cxSave = rcWindow.right - rcWindow.left;
737  }
738  }
739 
741  }
742 
743  void OnMove(HWND hwnd, int x, int y)
744  {
745  if (m_fMoving || m_fAutoHide)
746  return;
747 
748  if (!m_fHiding)
749  AppBar_Size(hwnd);
750  }
751 
753  {
755 
756  m_hwnd = NULL;
758  delete this;
759  }
760 
761  void OnTimer(HWND hwnd, UINT id)
762  {
763  POINT pt;
764  RECT rc;
765  HWND hwndActive;
766 
767  switch (id)
768  {
769  case IDT_AUTOHIDE:
770  if (m_fAutoHide && !m_fHiding && !m_fMoving)
771  {
772  GetCursorPos(&pt);
773  GetWindowRect(hwnd, &rc);
774  hwndActive = GetForegroundWindow();
775 
776  if (!PtInRect(&rc, pt) &&
777  hwndActive != hwnd &&
778  hwndActive != NULL &&
779  GetWindowOwner(hwndActive) != hwnd)
780  {
781  KillTimer(hwnd, id);
782  AppBar_Hide(hwnd);
783  }
784  }
785  break;
786 
787  case IDT_AUTOUNHIDE:
788  KillTimer(hwnd, id);
789 
790  if (m_fAutoHide && m_fHiding)
791  {
792  GetCursorPos(&pt);
793  GetWindowRect(hwnd, &rc);
794  if (PtInRect(&rc, pt))
795  {
797  }
798  }
799  break;
800  }
801  }
802 
804  {
806 
808 
809  if (m_uSide == ABE_TOP && uHitTest == HTBOTTOM)
810  return HTBOTTOM;
811 
812  if (m_uSide == ABE_BOTTOM && uHitTest == HTTOP)
813  return HTTOP;
814 
815  if (m_uSide == ABE_LEFT && uHitTest == HTRIGHT)
816  return HTRIGHT;
817 
818  if (m_uSide == ABE_RIGHT && uHitTest == HTLEFT)
819  return HTLEFT;
820 
821  return HTCLIENT;
822  }
823 
824  void OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
825  {
826  m_fMoving = TRUE;
827  m_bDragged = FALSE;
828  SetCapture(hwnd);
830  }
831 
832  void OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags)
833  {
834  if (!m_fMoving)
835  return;
836 
837  POINT pt;
838  GetCursorPos(&pt);
841  {
842  m_bDragged = TRUE;
843  }
844 
845  INT cxScreen = GetSystemMetrics(SM_CXSCREEN);
846  INT cyScreen = GetSystemMetrics(SM_CYSCREEN);
847 
848  DWORD dx, dy;
849  UINT ix, iy;
850  if (pt.x < cxScreen / 2)
851  {
852  dx = pt.x;
853  ix = ABE_LEFT;
854  }
855  else
856  {
857  dx = cxScreen - pt.x;
858  ix = ABE_RIGHT;
859  }
860 
861  if (pt.y < cyScreen / 2)
862  {
863  dy = pt.y;
864  iy = ABE_TOP;
865  }
866  else
867  {
868  dy = cyScreen - pt.y;
869  iy = ABE_BOTTOM;
870  }
871 
872  if (cxScreen * dy > cyScreen * dx)
873  {
874  m_rcDrag.top = 0;
875  m_rcDrag.bottom = cyScreen;
876  if (ix == ABE_LEFT)
877  {
878  m_uSide = ABE_LEFT;
879  m_rcDrag.left = 0;
881  }
882  else
883  {
884  m_uSide = ABE_RIGHT;
885  m_rcDrag.right = cxScreen;
887  }
888  }
889  else
890  {
891  m_rcDrag.left = 0;
892  m_rcDrag.right = cxScreen;
893  if (iy == ABE_TOP)
894  {
895  m_uSide = ABE_TOP;
896  m_rcDrag.top = 0;
898  }
899  else
900  {
902  m_rcDrag.bottom = cyScreen;
904  }
905  }
906 
908 
909  if (m_bDragged)
910  {
914  TRUE);
915  }
916  }
917 
918  void OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags)
919  {
920  if (!m_fMoving)
921  return;
922 
923  OnMouseMove(hwnd, x, y, keyFlags);
924 
926 
927  ReleaseCapture();
928 
929  if (m_fAutoHide)
930  {
931  switch (m_uSide)
932  {
933  case ABE_TOP:
934  m_rcDrag.bottom = m_rcDrag.top + 2;
935  break;
936  case ABE_BOTTOM:
937  m_rcDrag.top = m_rcDrag.bottom - 2;
938  break;
939  case ABE_LEFT:
940  m_rcDrag.right = m_rcDrag.left + 2;
941  break;
942  case ABE_RIGHT:
943  m_rcDrag.left = m_rcDrag.right - 2;
944  break;
945  }
946  }
947 
948  if (m_bDragged)
949  {
950  if (m_fAutoHide)
951  {
953  }
954  else
955  {
956  APPBARDATA abd = { sizeof(abd) };
957  abd.hWnd = hwnd;
959  }
960  }
961 
962  m_fMoving = FALSE;
963  }
964 
965  void GetWorkArea(LPRECT prc) const
966  {
967  SystemParametersInfoW(SPI_GETWORKAREA, 0, prc, 0);
968  }
969 
970 public:
971  void DoAction()
972  {
973 #define INTERVAL 250
974  POINT pt;
975  RECT rc1, rc2, rcWork;
977 
978  GetWindowRect(s_hwnd1, &rc1);
980  GetWorkArea(&rcWork);
982  ok_long(rc1.top, s_rcWorkArea.top);
984  ok_long(rc1.bottom, s_rcWorkArea.top + 80);
985  ok_long(rc2.left, s_rcWorkArea.left);
986  ok_long(rc2.top, s_rcWorkArea.top + 80);
987  ok_long(rc2.right, s_rcWorkArea.right);
988  ok_long(rc2.bottom, s_rcWorkArea.top + 110);
989  ok_long(rcWork.left, s_rcWorkArea.left);
990  ok_long(rcWork.top, s_rcWorkArea.top + 110);
991  ok_long(rcWork.right, s_rcWorkArea.right);
993  PostMessage(s_hwnd1, WM_CLOSE, 0, 0);
994  Sleep(INTERVAL);
995 
997  GetWorkArea(&rcWork);
998  ok_long(rc2.left, s_rcWorkArea.left);
999  ok_long(rc2.top, s_rcWorkArea.top);
1000  ok_long(rc2.right, s_rcWorkArea.right);
1001  ok_long(rc2.bottom, s_rcWorkArea.top + 30);
1002  ok_long(rcWork.left, s_rcWorkArea.left);
1003  ok_long(rcWork.top, s_rcWorkArea.top + 30);
1004  ok_long(rcWork.right, s_rcWorkArea.right);
1005  ok_long(rcWork.bottom, s_rcWorkArea.bottom);
1007  Sleep(INTERVAL);
1008 
1010  GetWorkArea(&rcWork);
1011  ok_long(rc2.left, s_rcWorkArea.left);
1012  ok_long(rc2.top, s_rcWorkArea.top);
1013  ok_long(rc2.right, s_rcWorkArea.left + 30);
1014  ok_long(rcWork.left, s_rcWorkArea.left + 30);
1015  ok_long(rcWork.top, s_rcWorkArea.top);
1016  ok_long(rcWork.right, s_rcWorkArea.right);
1017  ok_long(rcWork.bottom, s_rcWorkArea.bottom);
1019  Sleep(INTERVAL);
1020 
1022  GetWorkArea(&rcWork);
1023  ok_long(rc2.left, s_rcWorkArea.left);
1024  ok_long(rc2.top, s_rcWorkArea.top);
1025  ok_long(rc2.right, s_rcWorkArea.right);
1026  ok_long(rc2.bottom, s_rcWorkArea.top + 30);
1027  ok_long(rcWork.left, s_rcWorkArea.left);
1028  ok_long(rcWork.top, s_rcWorkArea.top + 30);
1029  ok_long(rcWork.right, s_rcWorkArea.right);
1030  ok_long(rcWork.bottom, s_rcWorkArea.bottom);
1032  Sleep(INTERVAL);
1033 
1035  GetWorkArea(&rcWork);
1036  ok_long(rc2.left, s_rcWorkArea.right - 30);
1037  ok_long(rc2.top, s_rcWorkArea.top);
1038  ok_long(rc2.right, s_rcWorkArea.right);
1039  ok_long(rcWork.left, s_rcWorkArea.left);
1040  ok_long(rcWork.top, s_rcWorkArea.top);
1041  ok_long(rcWork.right, s_rcWorkArea.right - 30);
1042  ok_long(rcWork.bottom, s_rcWorkArea.bottom);
1043  Sleep(INTERVAL);
1044 
1046  pt.x = (rc2.left + rc2.right) / 2;
1047  pt.y = (rc2.top + rc2.bottom) / 2;
1048  MOVE(pt.x, pt.y);
1049  LEFT_DOWN();
1050  MOVE(pt.x + 64, pt.y + 64);
1051  Sleep(INTERVAL);
1052 
1053  pt.x = s_rcWorkArea.left + 80;
1054  pt.y = (s_rcWorkArea.top + s_rcWorkArea.bottom) / 2;
1055  MOVE(pt.x, pt.y);
1056  LEFT_UP();
1057  Sleep(INTERVAL);
1058 
1060  GetWorkArea(&rcWork);
1061  ok_long(rc2.left, s_rcWorkArea.left);
1062  ok_long(rc2.top, s_rcWorkArea.top);
1063  ok_long(rc2.right, s_rcWorkArea.left + 30);
1064  ok_long(rcWork.left, s_rcWorkArea.left + 30);
1065  ok_long(rcWork.top, s_rcWorkArea.top);
1066  ok_long(rcWork.right, s_rcWorkArea.right);
1067  ok_long(rcWork.bottom, s_rcWorkArea.bottom);
1068  Sleep(INTERVAL);
1069 
1071  pt.x = (rc2.left + rc2.right) / 2;
1072  pt.y = (rc2.top + rc2.bottom) / 2;
1073  MOVE(pt.x, pt.y);
1074  LEFT_DOWN();
1075  MOVE(pt.x + 64, pt.y + 64);
1076  Sleep(INTERVAL);
1077 
1078  pt.x = s_rcWorkArea.right - 80;
1079  pt.y = (s_rcWorkArea.top + s_rcWorkArea.bottom) / 2;
1080  MOVE(pt.x, pt.y);
1081  LEFT_UP();
1082  Sleep(INTERVAL);
1083 
1085  GetWorkArea(&rcWork);
1086  ok_long(rc2.left, s_rcWorkArea.right - 30);
1087  ok_long(rc2.top, s_rcWorkArea.top);
1088  ok_long(rc2.right, s_rcWorkArea.right);
1089  ok_long(rcWork.left, s_rcWorkArea.left);
1090  ok_long(rcWork.top, s_rcWorkArea.top);
1091  ok_long(rcWork.right, s_rcWorkArea.right - 30);
1092  ok_long(rcWork.bottom, s_rcWorkArea.bottom);
1093  Sleep(INTERVAL);
1094 
1095  SendMessage(s_hwnd2, WM_CLOSE, 0, 0);
1096  Sleep(INTERVAL);
1097 
1098  GetWorkArea(&rcWork);
1099  ok_long(rcWork.left, s_rcWorkArea.left);
1100  ok_long(rcWork.top, s_rcWorkArea.top);
1101  ok_long(rcWork.right, s_rcWorkArea.right);
1102  ok_long(rcWork.bottom, s_rcWorkArea.bottom);
1103 
1104  PostMessage(s_hwnd2, WM_QUIT, 0, 0);
1105  PostThreadMessage(dwTID, WM_QUIT, 0, 0);
1106 #undef INTERVAL
1107  }
1108 
1110  {
1111  Window *this_ = (Window *)args;
1112  this_->DoAction();
1113  return 0;
1114  }
1115 };
1116 
1118 {
1120 
1122  {
1123  skip("Window::DoRegisterClass failed\n");
1124  return;
1125  }
1126 
1127  SystemParametersInfo(SPI_GETWORKAREA, 0, &s_rcWorkArea, FALSE);
1128 
1129  HWND hwnd1 = Window::DoCreateMainWnd(hInstance, TEXT("Test1"), 80, 80,
1131  if (!hwnd1)
1132  {
1133  skip("CreateWindowExW failed\n");
1134  return;
1135  }
1136 
1137  HWND hwnd2 = Window::DoCreateMainWnd(hInstance, TEXT("Test2"), 30, 30,
1139  if (!hwnd2)
1140  {
1141  skip("CreateWindowExW failed\n");
1142  return;
1143  }
1144 
1145  s_hwnd1 = hwnd1;
1146  s_hwnd2 = hwnd2;
1147 
1148  PostMessage(hwnd1, WM_COMMAND, ID_ACTION, 0);
1149 
1151 }
#define HTTOP
Definition: winuser.h:2465
#define WS_THICKFRAME
Definition: pedump.c:630
#define ABM_GETAUTOHIDEBAR
Definition: shellapi.h:66
#define HTLEFT
Definition: winuser.h:2462
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define WS_EX_WINDOWEDGE
Definition: winuser.h:407
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
#define SWP_DRAWFRAME
Definition: winuser.h:1224
#define ABE_TOP
Definition: shellapi.h:18
#define DispatchMessage
Definition: winuser.h:5740
#define ID_ACTION
void OnWindowPosChanged(HWND hwnd, const LPWINDOWPOS lpwpos)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
void OnSize(HWND hwnd, UINT state, int cx, int cy)
#define CloseHandle
Definition: compat.h:598
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
#define MOVE(x, y)
_In_ int _Inout_ LPRECT lprc
Definition: winuser.h:4440
void DoAction()
long y
Definition: polytest.cpp:48
#define SetWindowRedraw(hwnd, fRedraw)
Definition: windowsx.h:509
#define INTERVAL
#define WM_LBUTTONDOWN
Definition: winuser.h:1758
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
long x
Definition: polytest.cpp:48
void AppBar_SetAutoHideTimer(HWND hwnd)
void AppBar_PosChanged(PAPPBARDATA pabd)
void AppBar_QueryPos(HWND hwnd, LPRECT lprc)
#define TRUE
Definition: types.h:120
#define pt(x, y)
Definition: drawing.c:79
GLint dy
Definition: linetemp.h:97
WORD vk
Definition: input.c:77
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
void OnAppBarCallback(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static HDC
Definition: imagelist.c:92
#define CALLBACK
Definition: compat.h:35
virtual LRESULT CALLBACK WindowProcDx(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL WINAPI UpdateWindow(_In_ HWND)
#define WM_QUIT
Definition: winuser.h:1605
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
#define SystemParametersInfo
Definition: winuser.h:5833
LONG top
Definition: windef.h:307
GLdouble GLdouble t
Definition: gl.h:2047
HANDLE HWND
Definition: compat.h:19
#define ZeroMemory
Definition: winbase.h:1648
#define WM_MOVE
Definition: winuser.h:1592
void OnTimer(HWND hwnd, UINT id)
#define HWND_TOPMOST
Definition: winuser.h:1194
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define LEFT_UP()
void AppBar_Hide(HWND hwnd)
UINT uCallbackMessage
Definition: shellapi.h:217
#define ABM_GETTASKBARPOS
Definition: shellapi.h:64
#define WM_NCHITTEST
Definition: winuser.h:1668
HWND hWnd
Definition: shellapi.h:216
#define IDI_APPLICATION
Definition: winuser.h:699
UINT_PTR WPARAM
Definition: windef.h:207
HBRUSH hbrBackground
Definition: winuser.h:3145
#define HTRIGHT
Definition: winuser.h:2464
LONG left
Definition: windef.h:306
#define SWP_NOZORDER
Definition: winuser.h:1232
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define VK_ESCAPE
Definition: winuser.h:2189
#define WS_CLIPCHILDREN
Definition: pedump.c:619
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2635
#define ok_long(expression, result)
Definition: atltest.h:133
int iy
Definition: tritemp.h:491
LONG right
Definition: windef.h:308
#define ABE_LEFT
Definition: shellapi.h:17
#define BOOL
Definition: nt_native.h:43
CREATESTRUCTA * LPCREATESTRUCT
Definition: winuser.h:5701
BOOL WINAPI DestroyWindow(_In_ HWND)
Definition: match.c:390
void OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags)
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
int32_t INT
Definition: typedefs.h:58
#define SetWindowLongPtr
Definition: treelist.c:70
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: shellapi.h:220
#define DrawText
Definition: winuser.h:5746
BOOL OnCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct)
void SlideWindow(HWND hwnd, LPRECT prc)
#define GetWindowText
Definition: winuser.h:5773
#define wvsprintf
Definition: winuser.h:5841
#define ABM_ACTIVATE
Definition: shellapi.h:65
UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
Definition: appbar.c:64
#define LEFT_DOWN()
void OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
static INT DoMainLoop()
void OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
#define SM_CXSCREEN
Definition: winuser.h:949
Definition: window.c:28
HINSTANCE hInstance
Definition: charmap.c:20
#define COLOR_3DFACE
Definition: winuser.h:919
#define va_end(ap)
Definition: acmsvcex.h:90
#define FALSE
Definition: types.h:117
static const WCHAR szText[]
Definition: dialog.c:139
HANDLE WINAPI GetCurrentThread(VOID)
Definition: proc.c:1148
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define ABM_GETSTATE
Definition: shellapi.h:63
#define THREAD_PRIORITY_HIGHEST
Definition: winbase.h:274
#define FORWARD_WM_NCHITTEST(hwnd, x, y, fn)
Definition: windowsx.h:166
void AppBar_SetAutoUnhideTimer(HWND hwnd)
void AppBar_QuerySetPos(UINT uEdge, LPRECT lprc, PAPPBARDATA pabd, BOOL fMove)
HCURSOR hCursor
Definition: winuser.h:3144
#define CreateWindowEx
Definition: winuser.h:5730
#define CW_USEDEFAULT
Definition: winuser.h:225
#define GWLP_USERDATA
Definition: treelist.c:63
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:581
DWORD WINAPI GetWindowThreadProcessId(HWND, PDWORD)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:136
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:656
#define ABE_RIGHT
Definition: shellapi.h:19
#define WM_KEYDOWN
Definition: winuser.h:1697
LONG_PTR LPARAM
Definition: windef.h:208
char * va_list
Definition: acmsvcex.h:78
#define SM_CXDRAG
Definition: winuser.h:1018
const char * LPCSTR
Definition: xmlstorage.h:183
#define DT_VCENTER
Definition: winuser.h:543
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL AppBar_AutoHide(HWND hwnd)
BOOL m_fAutoHide
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI SetThreadPriority(IN HANDLE hThread, IN int nPriority)
Definition: thread.c:699
#define DefWindowProc
Definition: ros2win.h:31
#define WM_RBUTTONDOWN
Definition: winuser.h:1761
#define PostMessage
Definition: winuser.h:5807
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
char TCHAR
Definition: xmlstorage.h:189
#define SM_CYSCREEN
Definition: winuser.h:950
#define HWND_BOTTOM
Definition: winuser.h:1191
static Window * GetAppbarData(HWND hwnd)
#define trace
Definition: atltest.h:70
#define WM_SIZE
Definition: winuser.h:1593
#define SWP_NOACTIVATE
Definition: winuser.h:1227
void OnNCDestroy(HWND hwnd)
BOOL AppBar_UnRegister(HWND hwnd)
#define WM_TIMER
Definition: winuser.h:1724
#define WA_ACTIVE
Definition: winuser.h:2598
#define WM_CLOSE
Definition: winuser.h:1603
void AppBar_Size(HWND hwnd)
#define WM_NCDESTROY
Definition: winuser.h:1666
#define PostThreadMessage
Definition: winuser.h:5808
void AppBar_SetAlwaysOnTop(HWND hwnd, BOOL fOnTop)
#define FORWARD_WM_WINDOWPOSCHANGED(hwnd, lpwpos, fn)
Definition: windowsx.h:215
#define WINAPI
Definition: msvc.h:6
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define ABM_NEW
Definition: shellapi.h:59
int WINAPI GetSystemMetrics(_In_ int)
#define HTBOTTOM
Definition: winuser.h:2468
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WA_CLICKACTIVE
Definition: winuser.h:2599
#define APPBAR_CALLBACK
void OnActivate(HWND hwnd, UINT state, HWND hwndActDeact, BOOL fMinimized)
#define ABM_SETAUTOHIDEBAR
Definition: shellapi.h:67
GLbitfield flags
Definition: glext.h:7161
BOOL AppBar_SetSide(HWND hwnd, UINT uSide)
#define WM_PAINT
Definition: winuser.h:1602
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
int ret
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
HDC hdc
Definition: main.c:9
static int state
Definition: maze.c:121
#define WS_EX_TOPMOST
Definition: pedump.c:647
START_TEST(SHAppBarMessage)
#define WM_COMMAND
Definition: winuser.h:1722
LPCSTR lpszClassName
Definition: winuser.h:3147
static DWORD WINAPI ActionThreadFunc(LPVOID args)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
static HWND s_hwnd2
#define LoadCursor
Definition: winuser.h:5787
#define ABN_FULLSCREENAPP
Definition: shellapi.h:71
static BOOL DoRegisterClass(HINSTANCE hInstance)
void OnMove(HWND hwnd, int x, int y)
#define ABN_POSCHANGED
Definition: shellapi.h:70
#define SWP_NOSIZE
Definition: winuser.h:1230
#define IDT_AUTOUNHIDE
#define ABE_BOTTOM
Definition: shellapi.h:20
static HWND s_hwnd1
BOOL m_fAppBarRegd
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define DT_SINGLELINE
Definition: winuser.h:540
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
HWND WINAPI SetCapture(_In_ HWND hWnd)
#define SW_SHOWNORMAL
Definition: winuser.h:764
BOOL AppBar_SetAutoHide(HWND hwnd, BOOL fHide)
static RECT s_rcWorkArea
#define TEXT(s)
Definition: k32.h:26
#define WS_BORDER
Definition: pedump.c:625
#define IDT_AUTOHIDE
static const TCHAR s_szName[]
#define WM_ACTIVATE
Definition: winuser.h:1594
int WINAPIV wsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR,...)
#define GetModuleHandle
Definition: winbase.h:3667
LPVOID lpCreateParams
Definition: winuser.h:2915
HINSTANCE hInstance
Definition: winuser.h:3142
#define RDW_ALLCHILDREN
Definition: winuser.h:1207
#define WM_LBUTTONUP
Definition: winuser.h:1759
void OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags)
#define ABM_WINDOWPOSCHANGED
Definition: shellapi.h:68
BOOL AppBar_NoAutoHide(HWND hwnd)
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define WS_POPUP
Definition: pedump.c:616
unsigned int UINT
Definition: ndis.h:50
#define WM_MOUSEMOVE
Definition: winuser.h:1757
void OnPaint(HWND hwnd)
HWND WINAPI GetForegroundWindow(void)
Definition: ntwrapper.h:392
#define SLIDE_HIDE
#define GetMessage
Definition: winuser.h:5765
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint dx
Definition: linetemp.h:97
HANDLE hThread
Definition: wizard.c:27
WNDPROC lpfnWndProc
Definition: winuser.h:3139
virtual ~Window()
#define skip(...)
Definition: atltest.h:64
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1644
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
#define msg(x)
Definition: auth_time.c:54
#define RDW_UPDATENOW
Definition: winuser.h:1206
#define IDC_ARROW
Definition: winuser.h:682
_Out_opt_ int * cx
Definition: commctrl.h:581
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2889
#define SendMessage
Definition: winuser.h:5818
#define WM_CREATE
Definition: winuser.h:1590
void OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags)
#define ABM_QUERYPOS
Definition: shellapi.h:61
Window(INT cx, INT cy, BOOL fAutoHide=FALSE)
#define ABM_REMOVE
Definition: shellapi.h:60
static HWND DoCreateMainWnd(HINSTANCE hInstance, LPCTSTR pszText, INT cx, INT cy, DWORD style=WS_POPUP|WS_THICKFRAME|WS_CLIPCHILDREN, DWORD exstyle=WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW|WS_EX_TOPMOST, BOOL fAutoHide=FALSE)
LONG bottom
Definition: windef.h:309
static int priority
Definition: timer.c:163
#define DT_CENTER
Definition: winuser.h:527
Window(HWND hwnd)
Definition: window.cpp:71
#define SWP_NOMOVE
Definition: winuser.h:1229
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define HANDLE_MSG(hwnd, message, fn)
Definition: windowsx.h:297
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SLIDE_SHOW
#define HWND_NOTOPMOST
Definition: winuser.h:1192
#define SM_CYDRAG
Definition: winuser.h:1019
_Check_return_ long __cdecl labs(_In_ long x)
#define WA_INACTIVE
Definition: winuser.h:2597
static const WCHAR rc2[]
Definition: oid.c:1216
#define RegisterClass
Definition: winuser.h:5811
#define LoadIcon
Definition: winuser.h:5788
#define GetWindowLongPtr
Definition: treelist.c:73
#define HTCLIENT
Definition: winuser.h:2450
#define ABM_SETPOS
Definition: shellapi.h:62
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
LONG_PTR LRESULT
Definition: windef.h:209
void AppBar_UnHide(HWND hwnd)
POINT m_ptDragOn
#define ABN_STATECHANGE
Definition: shellapi.h:69
Arabic default style
Definition: afstyles.h:93
_Out_ LPRECT prc
Definition: ntgdi.h:1658
void GetWorkArea(LPRECT prc) const
LPARAM lParam
Definition: combotst.c:139
UINT uEdge
Definition: shellapi.h:218
#define GW_HWNDPREV
Definition: winuser.h:757
static __inline LRESULT MSGDUMP_API MD_msgdump(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: msgdump.h:4655
Definition: dsound.c:943
int WINAPI GetThreadPriority(IN HANDLE hThread)
Definition: thread.c:738
void OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags)
BOOL AppBar_Register(HWND hwnd)
#define RDW_INVALIDATE
Definition: winuser.h:1200
UINT OnNCHitTest(HWND hwnd, int x, int y)
#define printf
Definition: config.h:203
HICON hIcon
Definition: winuser.h:3143
#define GetWindowOwner(hwnd)
Definition: windowsx.h:289