ReactOS 0.4.17-dev-116-ga4b6fe9
defwnd.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Win32k subsystem
3 * LICENSE: See COPYING in the top level directory
4 * PURPOSE: Miscellaneous User functions
5 * COPYRIGHT: 2008-2020 James Tabor <james.tabor@reactos.org>
6 */
7
8#include <win32k.h>
9#include <windowsx.h>
10
12
15
17{
19
20 memset (&dtp, 0, sizeof(dtp));
21 dtp.cbSize = sizeof(dtp);
22 if (flags & DT_TABSTOP)
23 {
24 dtp.iTabLength = (flags >> 8) & 0xff;
25 flags &= 0xffff00ff;
26 }
27 return DrawTextExWorker(hdc, (LPWSTR)str, count, rect, flags, &dtp);
28}
29
30
31HBRUSH FASTCALL
33{
34 if (ctlType == CTLCOLOR_SCROLLBAR)
35 {
40
41 /* if COLOR_WINDOW happens to be the same as COLOR_3DHILIGHT
42 * we better use 0x55aa bitmap brush to make scrollbar's background
43 * look different from the window background.
44 */
45 if ( bk == IntGetSysColor(COLOR_WINDOW))
46 return gpsi->hbrGray;
47
49 return hb;
50 }
51
53
54 if ((ctlType == CTLCOLOR_EDIT) || (ctlType == CTLCOLOR_LISTBOX))
55 {
57 }
58 else
59 {
62 }
63
65}
66
69{
70 POINT maxTrack, minTrack;
71 LONG style = pWnd->style;
72
73 if (Pos->flags & SWP_NOSIZE) return 0;
74 if ((style & WS_THICKFRAME) || ((style & (WS_POPUP | WS_CHILD)) == 0))
75 {
76 co_WinPosGetMinMaxInfo(pWnd, NULL, NULL, &minTrack, &maxTrack);
77 Pos->cx = min(Pos->cx, maxTrack.x);
78 Pos->cy = min(Pos->cy, maxTrack.y);
79 if (!(style & WS_MINIMIZE))
80 {
81 if (Pos->cx < minTrack.x) Pos->cx = minTrack.x;
82 if (Pos->cy < minTrack.y) Pos->cy = minTrack.y;
83 }
84 }
85 else
86 {
87 Pos->cx = max(Pos->cx, 0);
88 Pos->cy = max(Pos->cy, 0);
89 }
90 return 0;
91}
92
95{
96 RECT Rect;
97 LONG style = pWnd->style;
98
99 IntGetClientRect(pWnd, &Rect);
100 IntMapWindowPoints(pWnd, (style & WS_CHILD ? IntGetParent(pWnd) : NULL), (LPPOINT) &Rect, 2);
101
102 if (!(Pos->flags & SWP_NOCLIENTMOVE))
103 {
105 }
106
107 if (!(Pos->flags & SWP_NOCLIENTSIZE) || (Pos->flags & SWP_STATECHANGED))
108 {
110 else
111 {
113 co_IntSendMessage(UserHMGetHandle(pWnd), WM_SIZE, wp, MAKELONG(Rect.right - Rect.left, Rect.bottom - Rect.top));
114 }
115 }
116 return 0;
117}
118
119//
120// Handle a WM_SYSCOMMAND message. Called from DefWindowProc().
121//
124{
125 LRESULT lResult = 0;
126 BOOL Hook = FALSE;
127
128 if (ISITHOOKED(WH_CBT) || (pWnd->head.rpdesk->pDeskInfo->fsHooks & HOOKID_TO_FLAG(WH_CBT)))
129 {
130 Hook = TRUE;
132
133 if (lResult) return lResult;
134 }
135
136 switch (wParam & 0xfff0)
137 {
138 case SC_MOVE:
139 case SC_SIZE:
141 break;
142
143 case SC_MINIMIZE:
145 IntShowOwnedPopups(pWnd,FALSE); // This is done in ShowWindow! Need to retest!
147 break;
148
149 case SC_MAXIMIZE:
150 if (((pWnd->style & WS_MINIMIZE) != 0) && UserHMGetHandle(pWnd) == UserGetActiveWindow())
153 break;
154
155 case SC_RESTORE:
156 if (((pWnd->style & WS_MINIMIZE) != 0) && UserHMGetHandle(pWnd) == UserGetActiveWindow())
159 break;
160
161 case SC_CLOSE:
162 return co_IntSendMessage(UserHMGetHandle(pWnd), WM_CLOSE, 0, 0);
163
164 case SC_SCREENSAVE:
165 ERR("Screensaver Called!\n");
166 UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_START_SCREENSAVE, 0); // always lParam 0 == not Secure
167 break;
168
169 case SC_HOTKEY:
170 {
172
174 if (pWnd)
175 {
176 if (pWnd->spwndLastActive)
177 {
178 pWnd = pWnd->spwndLastActive;
179 }
180 UserRefObjectCo(pWnd, &Ref);
182 UserDerefObjectCo(pWnd);
183 if (pWnd->style & WS_MINIMIZE)
184 {
186 }
187 }
188 }
189 break;
190
191// case SC_DEFAULT:
192 case SC_MOUSEMENU:
193 {
194 POINT Pt;
195 Pt.x = (short)LOWORD(lParam);
196 Pt.y = (short)HIWORD(lParam);
197 MENU_TrackMouseMenuBar(pWnd, wParam & 0x000f, Pt);
198 }
199 break;
200
201 case SC_KEYMENU:
203 break;
204
205 default:
206 // We do not support anything else here so we should return normal even when sending a hook.
207 return 0;
208 }
209
210 return(Hook ? 1 : 0); // Don't call us again from user space.
211}
212
215{
216 PWND Ret;
217 PWND Child, OwnerWnd;
218
219 for(Child = Root->spwndChild; Child; Child = Child->spwndNext)
220 {
221 OwnerWnd = Child->spwndOwner;
222 if(!OwnerWnd)
223 continue;
224
225 if (!(Child->style & WS_POPUP) ||
226 !(Child->style & WS_VISIBLE) ||
227 /* Fixes CMD pop up properties window from having foreground. */
228 Owner->head.pti->MessageQueue != Child->head.pti->MessageQueue)
229 continue;
230
231 if(OwnerWnd == Owner)
232 {
233 Ret = Child;
234 return Ret;
235 }
236 }
237 return NULL;
238}
239
242{
243 PWND pwndPopUP = NULL;
245
246 /* Not for child windows. */
247 if (UserHMGetHandle(pWnd) != (HWND)wParam)
248 {
249 return FALSE;
250 }
251
252 switch((short)LOWORD(lParam))
253 {
254 case HTERROR:
255 {
258
259 if (Msg == WM_LBUTTONDOWN)
260 {
261 // Find a pop up window to bring active.
263 if (pwndPopUP)
264 {
265 // Not a child pop up from desktop.
266 if ( pwndPopUP != UserGetDesktopWindow()->spwndChild )
267 {
268 // Get original active window.
269 PWND pwndOrigActive = gpqForeground->spwndActive;
270
272
273 UserRefObjectCo(pwndPopUP, &Ref);
274 //UserSetActiveWindow(pwndPopUP);
275 co_IntSetForegroundWindow(pwndPopUP); // HACK
276 UserDerefObjectCo(pwndPopUP);
277
278 // If the change was made, break out.
279 if (pwndOrigActive != gpqForeground->spwndActive)
280 break;
281 }
282 }
283 }
285 if (Msg == WM_LBUTTONDOWN || Msg == WM_MBUTTONDOWN ||
286 Msg == WM_RBUTTONDOWN || Msg == WM_XBUTTONDOWN)
287 {
288 if (pwndPopUP)
289 {
290 FLASHWINFO fwi =
291 {sizeof(FLASHWINFO),
292 UserHMGetHandle(pwndPopUP),
293 FLASHW_ALL,
295 (gpsi->dtCaretBlink >> 3)};
296
297 // Now shake that window!
298 IntFlashWindowEx(pwndPopUP, &fwi);
299 }
301 }
302 break;
303 }
304
305 case HTCLIENT:
306 {
307 if (pWnd->pcls->spcur)
308 {
310 }
311 return FALSE;
312 }
313
314 case HTLEFT:
315 case HTRIGHT:
316 {
317 if (pWnd->style & WS_MAXIMIZE)
318 {
319 break;
320 }
322 return TRUE;
323 }
324
325 case HTTOP:
326 case HTBOTTOM:
327 {
328 if (pWnd->style & WS_MAXIMIZE)
329 {
330 break;
331 }
333 return TRUE;
334 }
335
336 case HTTOPLEFT:
337 case HTBOTTOMRIGHT:
338 {
339 if (pWnd->style & WS_MAXIMIZE)
340 {
341 break;
342 }
343 IntSystemSetCursor(SYSTEMCUR(SIZENWSE));
344 return TRUE;
345 }
346
347 case HTBOTTOMLEFT:
348 case HTTOPRIGHT:
349 {
350 if (pWnd->style & WS_MAXIMIZE)
351 {
352 break;
353 }
354 IntSystemSetCursor(SYSTEMCUR(SIZENESW));
355 return TRUE;
356 }
357 }
359 return FALSE;
360}
361
363{
364 /*
365 * Visibility flag.
366 */
367 if ( (uFlags & PRF_CHECKVISIBLE) &&
368 !IntIsWindowVisible(pwnd) )
369 return;
370
371 /*
372 * Unimplemented flags.
373 */
374 if ( (uFlags & PRF_CHILDREN) ||
375 (uFlags & PRF_OWNED) ||
377 {
378 FIXME("WM_PRINT message with unsupported flags\n");
379 }
380
381 /*
382 * Background
383 */
384 if ( uFlags & PRF_ERASEBKGND)
386
387 /*
388 * Client area
389 */
390 if ( uFlags & PRF_CLIENT)
392}
393
394BOOL
396{
397 BOOL Ret = FALSE;
398
399 if ( (pWnd->style & WS_VISIBLE) && ((pWnd->style & WS_CAPTION) == WS_CAPTION) )
400 {
401 if (pWnd->state & WNDS_HASCAPTION && pWnd->head.pti->MessageQueue == gpqForeground)
402 Flags |= DC_ACTIVE;
403 /*
404 * When themes are not enabled we can go on and paint the non client area.
405 * However if we do that with themes enabled we will draw a classic frame.
406 * This is solved by sending a themes specific message to notify the themes
407 * engine that the caption needs to be redrawn.
408 */
410 {
411 /*
412 * This will cause uxtheme to either paint the themed caption or call
413 * RealUserDrawCaption in order to draw the classic caption when themes
414 * are disabled but the themes service is enabled.
415 */
416 TRACE("UDCB Flags %08x\n", Flags);
418 }
419 else
420 {
422 UserDrawCaptionBar(pWnd, hDC, Flags | DC_FRAME); // DCFRAME added as fix for CORE-10855.
423 UserReleaseDC(pWnd, hDC, FALSE);
424 }
425 Ret = TRUE;
426 }
427 // Support window tray
428 return Ret;
429}
430
431// WM_SETICON
434{
435 HICON hIcon, hIconSmall, hIconOld;
436
437 if ( wParam > ICON_SMALL2 )
438 {
440 return 0;
441 }
442 hIconSmall = UserGetProp(pWnd, gpsi->atomIconSmProp, TRUE);
444
445 hIconOld = wParam == ICON_BIG ? hIcon : hIconSmall;
446
447 switch(wParam)
448 {
449 case ICON_BIG:
450 hIcon = (HICON)lParam;
451 break;
452 case ICON_SMALL:
453 hIconSmall = (HICON)lParam;
454 break;
455 case ICON_SMALL2:
456 ERR("FIXME: Set ICON_SMALL2 support!\n");
457 default:
458 break;
459 }
460
461 UserSetProp(pWnd, gpsi->atomIconProp, hIcon, TRUE);
462 UserSetProp(pWnd, gpsi->atomIconSmProp, hIconSmall, TRUE);
463
464 if ((pWnd->style & WS_CAPTION ) == WS_CAPTION)
466
467 return (LRESULT)hIconOld;
468}
469
472{
473 HICON hIconRet;
474 if ( wParam > ICON_SMALL2 )
475 {
477 return 0;
478 }
479 switch(wParam)
480 {
481 case ICON_BIG:
482 hIconRet = UserGetProp(pWnd, gpsi->atomIconProp, TRUE);
483 break;
484 case ICON_SMALL:
485 case ICON_SMALL2:
486 hIconRet = UserGetProp(pWnd, gpsi->atomIconSmProp, TRUE);
487 break;
489 }
490 return (LRESULT)hIconRet;
491}
492
495{
496 PWND pwndNode1;
497 PTHREADINFO pti = pWnd->head.pti, ptiNode;
498 BOOL bFoundNullNode = FALSE;
499
500 for (pwndNode1 = pWnd->spwndNext; pwndNode1 != pWnd; )
501 {
502 if (!pwndNode1) /* NULL detected? */
503 {
504 if (bFoundNullNode)
505 return NULL;
506 bFoundNullNode = TRUE;
507 /* Retry with parent's first child (once only) */
508 pwndNode1 = pWnd->spwndParent->spwndChild;
509 continue;
510 }
511
512 /*
513 * 1. We want to detect the window that owns the same input target of pWnd.
514 * 2. For non-16-bit apps, we need to check the two threads' input queues to
515 * see whether they are the same, while for 16-bit apps it's sufficient to
516 * only check the thread info pointers themselves (ptiNode and pti).
517 * See also:
518 * https://devblogs.microsoft.com/oldnewthing/20060221-09/?p=32203
519 * https://github.com/reactos/reactos/pull/7700#discussion_r1939435931
520 */
521 ptiNode = pwndNode1->head.pti;
522 if ((!(pti->TIF_flags & TIF_16BIT) && ptiNode->MessageQueue == pti->MessageQueue) ||
523 ((pti->TIF_flags & TIF_16BIT) && ptiNode == pti))
524 {
525 DWORD style = pwndNode1->style;
526 if ((style & WS_VISIBLE) && !(style & WS_DISABLED)) /* Visible and enabled? */
527 {
528 /* Does pwndNode1 have a pWnd as an ancestor? */
529 PWND pwndNode2;
530 for (pwndNode2 = pwndNode1->spwndOwner; pwndNode2;
531 pwndNode2 = pwndNode2->spwndOwner)
532 {
533 if (pwndNode2 == pWnd)
534 return pwndNode1;
535 }
536 }
537 }
538
539 pwndNode1 = pwndNode1->spwndNext;
540 }
541
542 return NULL;
543}
544
547{
548 RECT rect;
549 HDC hdc;
550 INT w;
551 INT h;
553 HDC hdc2;
554 SETCLIPBDATA scd = {FALSE, FALSE};
555
558
559 hdc = UserGetWindowDC(pWnd);
560 IntGetWindowRect(pWnd, &rect);
561 w = rect.right - rect.left;
562 h = rect.bottom - rect.top;
563
567
568 NtGdiBitBlt(hdc2, 0, 0, w, h, hdc, 0, 0, SRCCOPY, CLR_INVALID, 0);
569
571
572 UserReleaseDC(pWnd, hdc, FALSE);
573 UserReleaseDC(pWnd, hdc2, FALSE);
574
576}
577
578// WM_POPUPSYSTEMMENU
579static BOOL
581{
582 USER_REFERENCE_ENTRY MenuRef, WndRef;
583 PMENU pMenu;
584 UINT uDefaultCmd;
585
586 FIXME("co_UserTrackSystemMenu() called\n"); // Useful trace, while working on CORE-3247
587
588 UserRefObjectCo(pWnd, &WndRef);
589
590 // Check style and make window foreground
591 if ((pWnd->style & WS_DISABLED) ||
592 (pWnd->state2 & WNDS2_INDESTROY) ||
593 (pWnd->head.pti->MessageQueue != gpqForeground && !co_IntSetForegroundWindow(pWnd)))
594 {
595 UserDerefObjectCo(pWnd);
596 return FALSE;
597 }
598
599 // Get the window's system menu
600 pMenu = IntGetSystemMenu(pWnd, FALSE);
601 if (!pMenu)
602 {
603 UserDerefObjectCo(pWnd);
604 return FALSE;
605 }
606 UserRefObjectCo(pMenu, &MenuRef);
607
608 // Set default menu item
609 if (puCmdType)
610 uDefaultCmd = *puCmdType;
611 else if (pWnd->style & (WS_MINIMIZE | WS_MAXIMIZE))
612 uDefaultCmd = SC_RESTORE;
613 else
614 uDefaultCmd = SC_MAXIMIZE;
615 UserSetMenuDefaultItem(pMenu, uDefaultCmd, FALSE);
616
617 if (nClickPos == -1) // Input from keyboard?
618 FIXME("Use WM_KLUDGEMINRECT and TPM_VERTICAL\n");
619
620 // Show the menu and wait for menu tracking ending
622 LOWORD(nClickPos), HIWORD(nClickPos), pWnd, NULL);
623
624 UserDerefObjectCo(pMenu);
625 UserDerefObjectCo(pWnd);
626 return TRUE;
627}
628
629/*
630 Win32k counterpart of User DefWindowProc
631 */
634 PWND Wnd,
635 UINT Msg,
638 BOOL Ansi)
639{
641 LRESULT lResult = 0;
643
644 if (Msg > WM_USER) return 0;
645
646 switch (Msg)
647 {
648 case WM_DEVICECHANGE:
649 return TRUE;
650
651 case WM_GETTEXTLENGTH:
652 {
653 PWSTR buf;
654 ULONG len;
655
656 if (Wnd != NULL && Wnd->strName.Length != 0)
657 {
658 buf = Wnd->strName.Buffer;
659 if (buf != NULL &&
661 buf,
662 Wnd->strName.Length)))
663 {
664 lResult = (LRESULT) (Wnd->strName.Length / sizeof(WCHAR));
665 }
666 }
667
668 break;
669 }
670
671 case WM_GETTEXT: // FIXME: Handle Ansi
672 {
673 PWSTR buf = NULL;
674 PWSTR outbuf = (PWSTR)lParam;
675
676 if (Wnd != NULL && wParam != 0)
677 {
678 if (Wnd->strName.Buffer != NULL)
679 buf = Wnd->strName.Buffer;
680 else
681 outbuf[0] = L'\0';
682
683 if (buf != NULL)
684 {
685 if (Wnd->strName.Length != 0)
686 {
687 lResult = min(Wnd->strName.Length / sizeof(WCHAR), wParam - 1);
688 RtlCopyMemory(outbuf,
689 buf,
690 lResult * sizeof(WCHAR));
691 outbuf[lResult] = L'\0';
692 }
693 else
694 outbuf[0] = L'\0';
695 }
696 }
697 break;
698 }
699
700 case WM_SETTEXT: // FIXME: Handle Ansi
701 {
702 DefSetText(Wnd, (PCWSTR)lParam);
703
704 if ((Wnd->style & WS_CAPTION) == WS_CAPTION)
706 IntNotifyWinEvent(EVENT_OBJECT_NAMECHANGE, Wnd, OBJID_WINDOW, CHILDID_SELF, 0);
707 lResult = 1;
708 break;
709 }
710
711 case WM_SYSCOMMAND:
712 {
713 TRACE("hwnd %p WM_SYSCOMMAND %lx %lx\n", UserHMGetHandle(Wnd), wParam, lParam );
714 lResult = DefWndHandleSysCommand(Wnd, wParam, lParam);
715 break;
716 }
717
718 case WM_SHOWWINDOW:
719 {
720 if ((Wnd->style & WS_VISIBLE) && wParam) break;
721 if (!(Wnd->style & WS_VISIBLE) && !wParam) break;
722 if (!Wnd->spwndOwner) break;
723 if (LOWORD(lParam))
724 {
726 }
727 break;
728 }
729
731 return IntClientShutdown(Wnd, wParam, lParam);
732
733 case WM_APPCOMMAND:
734 {
735 PWND Parent;
736 if ( (Wnd->style & (WS_POPUP|WS_CHILD)) != WS_CHILD &&
737 Wnd != co_GetDesktopWindow(Wnd) )
738 {
739 if (!co_HOOK_CallHooks(WH_SHELL, HSHELL_APPCOMMAND, wParam, lParam))
740 co_IntShellHookNotify(HSHELL_APPCOMMAND, wParam, lParam);
741 break;
742 }
743 Parent = Wnd->spwndParent;
744 UserRefObjectCo(Parent, &Ref);
747 break;
748 }
749
751 /* This is an undocumented message used by the windows taskbar to
752 display the system menu of windows that belong to other processes. */
754 break;
755
756 case WM_KEYF1:
757 {
758 HELPINFO hi;
759 HMENU hMenu = UlongToHandle(Wnd->IDMenu);
760 PWND pwndActive = MENU_IsMenuActive();
761 hi.cbSize = sizeof(HELPINFO);
762 hi.MousePos = gpsi->ptCursor;
764 hi.hItemHandle = pwndActive ? UserHMGetHandle(pwndActive) : UserHMGetHandle(Wnd);
765 hi.iCtrlId = (Wnd->style & (WS_POPUP|WS_CHILD)) == WS_CHILD ? IntMenuItemFromPoint(Wnd, hMenu, hi.MousePos) : 0;
767
768 co_IntSendMessage( UserHMGetHandle(Wnd), WM_HELP, 0, (LPARAM)&hi );
769 break;
770 }
771
772 case WM_SETICON:
773 {
774 return DefWndSetIcon(Wnd, wParam, lParam);
775 }
776
777 case WM_GETICON:
778 {
779 return DefWndGetIcon(Wnd, wParam, lParam);
780 }
781
782 case WM_HELP:
783 {
784 PWND Parent = IntGetParent(Wnd);
786 break;
787 }
788
789 case WM_LBUTTONDOWN:
790 case WM_RBUTTONDOWN:
791 case WM_MBUTTONDOWN:
793 break;
794
795 case WM_NCLBUTTONDOWN:
797
798 case WM_NCRBUTTONDOWN:
800
801 case WM_LBUTTONDBLCLK:
803
806
807 case WM_RBUTTONUP:
808 {
809 POINT Pt;
810
811 Pt.x = GET_X_LPARAM(lParam);
812 Pt.y = GET_Y_LPARAM(lParam);
813 IntClientToScreen(Wnd, &Pt);
814 lParam = MAKELPARAM(Pt.x, Pt.y);
816 break;
817 }
818
819 case WM_NCRBUTTONUP:
820 /*
821 * FIXME : we must NOT send WM_CONTEXTMENU on a WM_NCRBUTTONUP (checked
822 * in Windows), but what _should_ we do? According to MSDN :
823 * "If it is appropriate to do so, the system sends the WM_SYSCOMMAND
824 * message to the window". When is it appropriate?
825 */
826 ERR("WM_NCRBUTTONUP\n");
827 break;
828
829 case WM_XBUTTONUP:
830 case WM_NCXBUTTONUP:
831 if (HIWORD(wParam) == XBUTTON1 || HIWORD(wParam) == XBUTTON2)
832 {
834 MAKELPARAM(LOWORD(wParam), FAPPCOMMAND_MOUSE | HIWORD(wParam)));
835 }
836 break;
837
838
839 case WM_CONTEXTMENU:
840 {
841 if (Wnd->style & WS_CHILD)
842 {
844 }
845 else
846 {
847 POINT Pt;
849 LONG HitCode;
850
851 Style = Wnd->style;
852
853 Pt.x = GET_X_LPARAM(lParam);
854 Pt.y = GET_Y_LPARAM(lParam);
855 if (Style & WS_CHILD)
856 {
858 }
859
860 HitCode = GetNCHitEx(Wnd, Pt);
861
862 if (HitCode == HTCAPTION || HitCode == HTSYSMENU)
863 {
864 PMENU SystemMenu;
865 UINT Flags;
866
867 if((SystemMenu = IntGetSystemMenu(Wnd, FALSE)))
868 {
869 MENU_InitSysMenuPopup(SystemMenu, Wnd->style, Wnd->pcls->style, HitCode);
870
871 if(HitCode == HTCAPTION)
873 else
875
876 IntTrackPopupMenuEx(SystemMenu, Flags|TPM_SYSTEM_MENU, Pt.x, Pt.y, Wnd, NULL);
877 }
878 }
879 if (HitCode == HTHSCROLL || HitCode == HTVSCROLL)
880 {
881 WARN("Scroll Menu Not Supported\n");
882 }
883 }
884 break;
885 }
886
887 case WM_KEYDOWN:
888 if (wParam == VK_F10)
889 {
890 pti->MessageQueue->QF_flags |= QF_FF10STATUS;
891
892 if (UserGetKeyState(VK_SHIFT) & 0x8000)
893 {
895 }
896 }
898 {
899 HWND hwndTop = UserGetForegroundWindow();
900 PWND topWnd = UserGetWindowObject(hwndTop);
901 BOOL allowSnap;
902
903 // MS Doc: foreground window can be NULL, e.g. when window is losing activation
904 if (!topWnd)
905 return 0;
906
907 allowSnap = IntIsSnapAllowedForWindow(topWnd);
908 /* Allow the minimize action if it has a minimize button, even if the window cannot be snapped (e.g. Calc.exe) */
909 if (!allowSnap && (topWnd->style & (WS_MINIMIZEBOX|WS_THICKFRAME)) == WS_MINIMIZEBOX)
910 allowSnap = wParam == VK_DOWN;
911
912 if (allowSnap)
913 {
914 UINT snapped = IntGetWindowSnapEdge(topWnd);
915
916 if (wParam == VK_DOWN)
917 {
918 if (topWnd->style & WS_MAXIMIZE)
920 else if (snapped)
921 co_IntUnsnapWindow(topWnd);
922 else
924 }
925 else if (wParam == VK_UP)
926 {
927 if (topWnd->style & WS_MINIMIZE)
929 else
931 }
932 else if (wParam == VK_LEFT || wParam == VK_RIGHT)
933 {
934 UINT edge = wParam == VK_LEFT ? HTLEFT : HTRIGHT;
935 UINT otherEdge = edge == HTLEFT ? HTRIGHT : HTLEFT;
936
937 if (topWnd->style & WS_MAXIMIZE)
938 {
939 /* SC_RESTORE + Snap causes the window to visually move twice, place it manually in the snap position */
940 RECT normalRect = topWnd->InternalPos.NormalRect;
941 co_IntCalculateSnapPosition(topWnd, edge, &topWnd->InternalPos.NormalRect); /* Calculate edge position */
942 IntSetSnapEdge(topWnd, edge); /* Tell everyone the edge we are snapped to */
944 IntSetSnapInfo(topWnd, edge, &normalRect); /* Reset the real place to unsnap to */
945 snapped = HTNOWHERE; /* Force snap */
946 }
947#if 0 /* Windows 8 does this but is it a good feature? */
948 else if (snapped == edge)
949 {
950 /* Already snapped to this edge, snap to the opposite side */
951 edge = otherEdge;
952 }
953#endif
954
955 if (snapped == otherEdge)
956 co_IntUnsnapWindow(topWnd);
957 else
958 co_IntSnapWindow(topWnd, edge);
959 }
960 }
961 }
962 break;
963
964 case WM_SYSKEYDOWN:
965 {
966 if (HIWORD(lParam) & KF_ALTDOWN)
967 { /* Previous state, if the key was down before this message,
968 this is a cheap way to ignore autorepeat keys. */
969 if ( !(HIWORD(lParam) & KF_REPEAT) )
970 {
971 if ( ( wParam == VK_MENU ||
972 wParam == VK_LMENU ||
973 wParam == VK_RMENU ) && !(pti->MessageQueue->QF_flags & QF_FMENUSTATUS)) //iMenuSysKey )
974 pti->MessageQueue->QF_flags |= QF_FMENUSTATUS; //iMenuSysKey = 1;
975 else
976 pti->MessageQueue->QF_flags &= ~QF_FMENUSTATUS; //iMenuSysKey = 0;
977 }
978
979 pti->MessageQueue->QF_flags &= ~QF_FF10STATUS; //iF10Key = 0;
980
981 if (wParam == VK_F4) /* Try to close the window */
982 {
984 if (!(top->pcls->style & CS_NOCLOSE))
986 }
987 else if (wParam == VK_SNAPSHOT) // Alt-VK_SNAPSHOT?
988 {
989 PWND pwnd = Wnd;
990 while (IntGetParent(pwnd) != NULL)
991 {
992 pwnd = IntGetParent(pwnd);
993 }
994 ERR("DefWndScreenshot\n");
995 DefWndScreenshot(pwnd);
996 }
997 else if ( wParam == VK_ESCAPE || wParam == VK_TAB ) // Alt-Tab/ESC Alt-Shift-Tab/ESC
998 {
999 WPARAM wParamTmp;
1000 HWND Active = UserGetActiveWindow(); // Noticed MDI problem.
1001 if (!Active)
1002 {
1003 FIXME("WM_SYSKEYDOWN VK_ESCAPE no active\n");
1004 break;
1005 }
1006 wParamTmp = UserGetKeyState(VK_SHIFT) & 0x8000 ? SC_PREVWINDOW : SC_NEXTWINDOW;
1008 }
1009 }
1010 else if( wParam == VK_F10 )
1011 {
1012 if (UserGetKeyState(VK_SHIFT) & 0x8000)
1014 pti->MessageQueue->QF_flags |= QF_FF10STATUS; //iF10Key = 1;
1015 }
1016 else if( wParam == VK_ESCAPE && (UserGetKeyState(VK_SHIFT) & 0x8000))
1018 break;
1019 }
1020
1021 case WM_KEYUP:
1022 case WM_SYSKEYUP:
1023 {
1024 /* Press and release F10 or ALT */
1025 if (((wParam == VK_MENU || wParam == VK_LMENU || wParam == VK_RMENU)
1026 && (pti->MessageQueue->QF_flags & (QF_FMENUSTATUS|QF_FMENUSTATUSBREAK)) == QF_FMENUSTATUS /*iMenuSysKey*/) ||
1027 ((wParam == VK_F10) && pti->MessageQueue->QF_flags & QF_FF10STATUS /*iF10Key*/))
1029 pti->MessageQueue->QF_flags &= ~(QF_FMENUSTATUS|QF_FMENUSTATUSBREAK|QF_FF10STATUS); //iMenuSysKey = iF10Key = 0;
1030 break;
1031 }
1032
1033 case WM_SYSCHAR:
1034 {
1035 pti->MessageQueue->QF_flags &= ~(QF_FMENUSTATUS|QF_FMENUSTATUSBREAK); //iMenuSysKey = 0;
1036 if (wParam == VK_RETURN && (Wnd->style & WS_MINIMIZE) != 0)
1037 {
1039 break;
1040 }
1041 if ((HIWORD(lParam) & KF_ALTDOWN) && wParam)
1042 {
1043 if (wParam == VK_TAB || wParam == VK_ESCAPE) break;
1044 if (wParam == VK_SPACE && Wnd->style & WS_CHILD)
1046 else
1048 }
1049 else /* check for Ctrl-Esc */
1050 if (wParam != VK_ESCAPE) UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_MESSAGE_BEEP, 0); //MessageBeep(0);
1051 break;
1052 }
1053
1054 case WM_CANCELMODE:
1055 {
1056 pti->MessageQueue->QF_flags &= ~(QF_FMENUSTATUS|QF_FMENUSTATUSBREAK);
1057
1058 MENU_EndMenu( Wnd );
1060 {
1062 }
1063 break;
1064 }
1065
1066 case WM_CLOSE:
1068 break;
1069
1070 case WM_CTLCOLORMSGBOX:
1071 case WM_CTLCOLOREDIT:
1072 case WM_CTLCOLORLISTBOX:
1073 case WM_CTLCOLORBTN:
1074 case WM_CTLCOLORDLG:
1075 case WM_CTLCOLORSTATIC:
1078
1079 case WM_CTLCOLOR:
1081
1082 case WM_SETCURSOR:
1083 {
1084 if (Wnd->style & WS_CHILD)
1085 {
1086 /* with the exception of the border around a resizable wnd,
1087 * give the parent first chance to set the cursor */
1089 {
1090 PWND parent = Wnd->spwndParent;//IntGetParent( Wnd );
1091 if (parent != UserGetDesktopWindow() &&
1093 return TRUE;
1094 }
1095 }
1096 return DefWndHandleSetCursor(Wnd, wParam, lParam);
1097 }
1098
1099 case WM_MOUSEACTIVATE:
1100 if (Wnd->style & WS_CHILD)
1101 {
1103 PWND pwndParent = IntGetParent(Wnd);
1104 hwndParent = pwndParent ? UserHMGetHandle(pwndParent) : NULL;
1105 if (hwndParent)
1106 {
1108 if (lResult)
1109 break;
1110 }
1111 }
1113
1114 case WM_ACTIVATE:
1115 /* The default action in Windows is to set the keyboard focus to
1116 * the window, if it's being activated and not minimized */
1117 if (LOWORD(wParam) != WA_INACTIVE &&
1118 !(Wnd->style & WS_MINIMIZE))
1119 {
1120 //ERR("WM_ACTIVATE %p\n",hWnd);
1121 co_UserSetFocus(Wnd);
1122 }
1123 break;
1124
1125 case WM_MOUSEWHEEL:
1126 if (Wnd->style & WS_CHILD)
1127 {
1129 PWND pwndParent = IntGetParent(Wnd);
1130 hwndParent = pwndParent ? UserHMGetHandle(pwndParent) : NULL;
1132 }
1133 break;
1134
1135 case WM_ERASEBKGND:
1136 case WM_ICONERASEBKGND:
1137 {
1138 RECT Rect;
1139 HBRUSH hBrush = Wnd->pcls->hbrBackground;
1140 if (!hBrush) return 0;
1141 if (hBrush <= (HBRUSH)COLOR_MENUBAR)
1142 {
1143 hBrush = IntGetSysColorBrush(HandleToUlong(hBrush));
1144 }
1145 if (Wnd->pcls->style & CS_PARENTDC)
1146 {
1147 /* can't use GetClipBox with a parent DC or we fill the whole parent */
1148 IntGetClientRect(Wnd, &Rect);
1150 }
1151 else
1152 {
1153 GdiGetClipBox((HDC)wParam, &Rect);
1154 }
1155 FillRect((HDC)wParam, &Rect, hBrush);
1156 return (1);
1157 }
1158
1159 case WM_GETHOTKEY:
1160 //ERR("WM_GETHOTKEY\n");
1161 return DefWndGetHotKey(Wnd);
1162 case WM_SETHOTKEY:
1163 //ERR("WM_SETHOTKEY\n");
1164 return DefWndSetHotKey(Wnd, wParam);
1165
1166 case WM_NCHITTEST:
1167 {
1168 POINT Point;
1171 return GetNCHitEx(Wnd, Point);
1172 }
1173
1174 case WM_PRINT:
1175 {
1176 DefWndPrint(Wnd, (HDC)wParam, lParam);
1177 return (0);
1178 }
1179
1180 case WM_SYSCOLORCHANGE:
1181 {
1182 /* force to redraw non-client area */
1183 UserPaintCaption(Wnd, DC_NC);
1184 /* Use InvalidateRect to redraw client area, enable
1185 * erase to redraw all subcontrols otherwise send the
1186 * WM_SYSCOLORCHANGE to child windows/controls is required
1187 */
1189 return (0);
1190 }
1191
1192 case WM_PAINTICON:
1193 case WM_PAINT:
1194 {
1195 PAINTSTRUCT Ps;
1196 HDC hDC;
1197
1198 /* If already in Paint and Client area is not empty just return. */
1199 if (Wnd->state2 & WNDS2_STARTPAINT && !RECTL_bIsEmptyRect(&Wnd->rcClient))
1200 {
1201 ERR("In Paint and Client area is not empty!\n");
1202 return 0;
1203 }
1204
1205 hDC = IntBeginPaint(Wnd, &Ps);
1206 if (hDC)
1207 {
1208 if (((Wnd->style & WS_MINIMIZE) != 0) && (Wnd->pcls->spicn))
1209 {
1210 RECT ClientRect;
1211 INT x, y;
1212
1213 ERR("Doing Paint and Client area is empty!\n");
1214 IntGetClientRect(Wnd, &ClientRect);
1215 x = (ClientRect.right - ClientRect.left - UserGetSystemMetrics(SM_CXICON)) / 2;
1216 y = (ClientRect.bottom - ClientRect.top - UserGetSystemMetrics(SM_CYICON)) / 2;
1218 UserDrawIconEx(hDC, x, y, Wnd->pcls->spicn, 0, 0, 0, 0, DI_NORMAL | DI_COMPAT | DI_DEFAULTSIZE);
1220 }
1221
1222 IntEndPaint(Wnd, &Ps);
1223 }
1224 return (0);
1225 }
1226
1227 case WM_SYNCPAINT:
1228 {
1229 HRGN hRgn;
1230 Wnd->state &= ~WNDS_SYNCPAINTPENDING;
1231 TRACE("WM_SYNCPAINT\n");
1232 hRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
1233 if (hRgn)
1234 {
1236 {
1237 PREGION pRgn = REGION_LockRgn(hRgn);
1238 if (pRgn) REGION_UnlockRgn(pRgn);
1239 if (!wParam)
1241 co_UserRedrawWindow(Wnd, NULL, pRgn, wParam);
1242 }
1244 }
1245 return 0;
1246 }
1247
1248 case WM_SETREDRAW:
1249 if (wParam)
1250 {
1251 if (!(Wnd->style & WS_VISIBLE))
1252 {
1253 IntSetStyle( Wnd, WS_VISIBLE, 0 );
1254 Wnd->state |= WNDS_SENDNCPAINT;
1255 }
1256 }
1257 else
1258 {
1259 if (Wnd->style & WS_VISIBLE)
1260 {
1262 IntSetStyle( Wnd, 0, WS_VISIBLE );
1263 }
1264 }
1265 return 0;
1266
1268 {
1270 }
1271
1273 {
1275 }
1276
1277 case WM_NCCALCSIZE:
1278 {
1279 return NC_HandleNCCalcSize( Wnd, wParam, (RECTL *)lParam, FALSE );
1280 }
1281
1282 case WM_NCACTIVATE:
1283 {
1284 return NC_HandleNCActivate( Wnd, wParam, lParam );
1285 }
1286
1287 //
1288 // NC Paint mode.
1289 //
1290 case WM_NCPAINT:
1291 {
1293 Wnd->state |= WNDS_FORCEMENUDRAW;
1294 NC_DoNCPaint(Wnd, hDC, -1);
1295 Wnd->state &= ~WNDS_FORCEMENUDRAW;
1296 UserReleaseDC(Wnd, hDC, FALSE);
1297 return 0;
1298 }
1299 //
1300 // Draw Caption mode.
1301 //
1302 // wParam are DC_* flags.
1303 //
1305 {
1307 TRACE("WM_NCUAHDRAWCAPTION: wParam DC_ flags %08x\n",wParam);
1308 UserDrawCaptionBar(Wnd, hDC, wParam | DC_FRAME); // Include DC_FRAME to comp for drawing glitch.
1309 UserReleaseDC(Wnd, hDC, FALSE);
1310 return 0;
1311 }
1312 //
1313 // Draw Frame mode.
1314 //
1315 // wParam is HDC, lParam are DC_ACTIVE and or DC_REDRAWHUNGWND.
1316 //
1317 case WM_NCUAHDRAWFRAME:
1318 {
1319 TRACE("WM_NCUAHDRAWFRAME: wParam hDC %p lParam DC_ flags %08x\n",wParam,lParam);
1321 return 0;
1322 }
1323
1324 /* ReactOS only. */
1325 case WM_CBT:
1326 {
1327 switch (wParam)
1328 {
1329 case HCBT_MOVESIZE:
1330 {
1331 RECTL rt;
1332
1333 if (lParam)
1334 {
1335 _SEH2_TRY
1336 {
1338 sizeof(RECT),
1339 1);
1340
1341 RtlCopyMemory(&rt,
1342 (PVOID)lParam,
1343 sizeof(RECT));
1344 }
1346 {
1347 lResult = 1;
1348 }
1349 _SEH2_END;
1350 }
1351 if (!lResult)
1353
1354 break;
1355 }
1356 }
1357 break;
1358 }
1359 }
1360 return lResult;
1361}
1362
1363/* EOF */
static HDC hDC
Definition: 3dtext.c:33
#define DCX_USESTYLE
Definition: GetDCEx.c:10
static HBITMAP hbitmap
HDC hdc2
Definition: SelectObject.c:10
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
Definition: acpixf.h:732
Arabic default style
Definition: afstyles.h:94
const DWORD Style
Definition: appswitch.c:72
#define CF_BITMAP
Definition: constants.h:397
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define UlongToHandle(ul)
Definition: basetsd.h:91
#define HandleToUlong(h)
Definition: basetsd.h:73
#define DBG_DEFAULT_CHANNEL(ch)
Definition: debug.h:106
RECT rect
Definition: combotst.c:67
struct @1767 Msg[]
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define SWP_NOCLIENTSIZE
Definition: msg.h:31
#define SWP_NOCLIENTMOVE
Definition: msg.h:32
BOOL FASTCALL GreDPtoLP(HDC, LPPOINT, INT)
Definition: dcutil.c:7
static HWND hwndParent
Definition: cryptui.c:300
#define SYSTEMCUR(func)
Definition: cursoricon.h:131
#define DC_ACTIVE
Definition: dc21x4.h:120
COLORREF FASTCALL IntGdiSetBkColor(_In_ HDC hDC, _In_ COLORREF Color)
COLORREF FASTCALL IntGdiSetTextColor(HDC hDC, COLORREF color)
Definition: dcutil.c:172
ush Pos
Definition: deflate.h:92
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
UINT uFlags
Definition: api.c:59
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:94
#define L(x)
Definition: resources.c:13
r parent
Definition: btrfs.c:3010
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:102
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
HWND FASTCALL co_UserSetFocus(PWND Window)
Definition: focus.c:1311
HWND FASTCALL IntGetCaptureWindow(VOID)
Definition: focus.c:34
PUSER_MESSAGE_QUEUE gpqForeground
Definition: focus.c:13
BOOL FASTCALL co_IntSetForegroundWindow(PWND Window)
Definition: focus.c:1545
BOOL FASTCALL IntReleaseCapture(VOID)
Definition: focus.c:1525
HWND FASTCALL UserGetActiveWindow(VOID)
Definition: focus.c:1426
HWND FASTCALL UserGetForegroundWindow(VOID)
Definition: focus.c:1418
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
GLenum GLsizei len
Definition: glext.h:6722
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define ISITHOOKED(HookId)
Definition: hook.h:6
#define HOOKID_TO_FLAG(HookId)
Definition: hook.h:5
PSERVERINFO gpsi
Definition: imm.c:18
#define WNDS_SENDNCPAINT
Definition: ntuser.h:616
#define UserHMGetHandle(obj)
Definition: ntuser.h:230
#define WNDS_FORCEMENUDRAW
Definition: ntuser.h:620
#define TIF_16BIT
Definition: ntuser.h:264
#define SRVINFO_APIHOOK
Definition: ntuser.h:950
#define WNDS2_INDESTROY
Definition: ntuser.h:648
#define WNDS_HASCAPTION
Definition: ntuser.h:608
#define WNDS2_STARTPAINT
Definition: ntuser.h:643
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
HGDIOBJ FASTCALL IntGetSysColorBrush(INT Object)
Definition: stockobj.c:317
DWORD FASTCALL IntGetSysColor(INT nIndex)
Definition: stockobj.c:323
LONG_PTR LPARAM
Definition: minwindef.h:175
LONG_PTR LRESULT
Definition: minwindef.h:176
UINT_PTR WPARAM
Definition: minwindef.h:174
#define SC_SCREENSAVE
Definition: mmsystem.h:934
HDC hdc
Definition: main.c:9
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:88
static HICON
Definition: imagelist.c:80
static HRGN hRgn
Definition: mapping.c:32
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define WM_KEYF1
Definition: msg.c:49
#define SWP_STATECHANGED
Definition: msg.c:44
#define min(a, b)
Definition: monoChain.cc:55
HICON hIcon
Definition: msconfig.c:44
DWORD FASTCALL UserGetKeyState(DWORD dwKey)
Definition: msgqueue.c:221
#define QF_FMENUSTATUSBREAK
Definition: msgqueue.h:96
#define QF_FMENUSTATUS
Definition: msgqueue.h:97
#define QF_FF10STATUS
Definition: msgqueue.h:98
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int * PUINT
Definition: ndis.h:50
unsigned int UINT
Definition: ndis.h:50
@ Root
Definition: cmtypes.h:261
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
Definition: rtlfuncs.h:1629
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteSize(_Out_ PULONG MbSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
Definition: nlsboot.c:146
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define FASTCALL
Definition: nt_native.h:50
#define DEFAULT_UNREACHABLE
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
LRESULT FASTCALL DefWndHandleWindowPosChanged(PWND pWnd, WINDOWPOS *Pos)
Definition: defwnd.c:94
LRESULT DefWndHandleSetCursor(PWND pWnd, WPARAM wParam, LPARAM lParam)
Definition: defwnd.c:241
LRESULT FASTCALL IntDefWindowProc(PWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Ansi)
Definition: defwnd.c:633
LRESULT FASTCALL DefWndGetIcon(PWND pWnd, WPARAM wParam, LPARAM lParam)
Definition: defwnd.c:471
VOID FASTCALL DefWndScreenshot(PWND pWnd)
Definition: defwnd.c:546
LRESULT FASTCALL DefWndHandleWindowPosChanging(PWND pWnd, WINDOWPOS *Pos)
Definition: defwnd.c:68
VOID FASTCALL DefWndPrint(PWND pwnd, HDC hdc, ULONG uFlags)
Definition: defwnd.c:362
LRESULT FASTCALL DefWndHandleSysCommand(PWND pWnd, WPARAM wParam, LPARAM lParam)
Definition: defwnd.c:123
BOOL UserPaintCaption(PWND pWnd, INT Flags)
Definition: defwnd.c:395
LRESULT FASTCALL DefWndSetIcon(PWND pWnd, WPARAM wParam, LPARAM lParam)
Definition: defwnd.c:433
static BOOL co_UserTrackSystemMenu(_In_ PWND pWnd, _In_ LONG nClickPos, _In_opt_ PUINT puCmdType)
Definition: defwnd.c:580
INT WINAPI DrawTextExWorker(HDC hdc, LPWSTR str, INT i_count, LPRECT rect, UINT flags, LPDRAWTEXTPARAMS dtp)
Definition: text.c:1071
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:16
PWND FASTCALL DWP_GetEnabledPopup(PWND pWnd)
Definition: defwnd.c:494
PWND FASTCALL co_IntFindChildWindowToOwner(PWND Root, PWND Owner)
Definition: defwnd.c:214
HBRUSH FASTCALL DefWndControlColor(HDC hDC, UINT ctlType)
Definition: defwnd.c:32
LRESULT APIENTRY co_HOOK_CallHooks(INT HookId, INT Code, WPARAM wParam, LPARAM lParam)
Definition: hook.c:1102
BOOL FASTCALL IntClientToScreen(PWND Wnd, LPPOINT lpPoint)
Definition: winpos.c:199
VOID FASTCALL IntSetSnapInfo(PWND Wnd, UINT Edge, IN const RECT *Pos OPTIONAL)
Definition: winpos.c:4041
BOOLEAN FASTCALL co_WinPosSetWindowPos(PWND Window, HWND WndInsertAfter, INT x, INT y, INT cx, INT cy, UINT flags)
Definition: winpos.c:1792
VOID FASTCALL co_IntSnapWindow(PWND Wnd, UINT Edge)
Definition: winpos.c:3969
VOID FASTCALL co_IntCalculateSnapPosition(PWND Wnd, UINT Edge, OUT RECT *Pos)
Definition: winpos.c:3939
BOOL FASTCALL IntGetWindowRect(PWND Wnd, RECTL *Rect)
Definition: winpos.c:121
UINT FASTCALL co_WinPosGetMinMaxInfo(PWND Window, POINT *MaxSize, POINT *MaxPos, POINT *MinTrack, POINT *MaxTrack)
Definition: winpos.c:940
BOOL FASTCALL IntScreenToClient(PWND Wnd, LPPOINT lpPoint)
Definition: winpos.c:213
BOOLEAN FASTCALL co_WinPosShowWindow(PWND Wnd, INT Cmd)
Definition: winpos.c:2622
UINT FASTCALL IntGetWindowSnapEdge(PWND Wnd)
Definition: winpos.c:3931
VOID FASTCALL IntSetSnapEdge(PWND Wnd, UINT Edge)
Definition: winpos.c:4016
HWND hwndSAS
Definition: winsta.c:24
static __inline VOID UserDerefObjectCo(PVOID obj)
Definition: object.h:43
static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
Definition: object.h:27
#define LRESULT
Definition: ole.h:14
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define WS_CAPTION
Definition: pedump.c:624
#define WS_MAXIMIZE
Definition: pedump.c:623
short WCHAR
Definition: pedump.c:58
#define WS_POPUP
Definition: pedump.c:616
#define WS_MINIMIZE
Definition: pedump.c:622
#define WS_VISIBLE
Definition: pedump.c:620
long LONG
Definition: pedump.c:60
#define WS_DISABLED
Definition: pedump.c:621
#define WS_MINIMIZEBOX
Definition: pedump.c:631
#define WS_THICKFRAME
Definition: pedump.c:630
__kernel_entry W32KAPI HBITMAP APIENTRY NtGdiCreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
__kernel_entry W32KAPI HDC APIENTRY NtGdiCreateCompatibleDC(_In_opt_ HDC hdc)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiBitBlt(_In_ HDC hdcDst, _In_ INT x, _In_ INT y, _In_ INT cx, _In_ INT cy, _In_opt_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ DWORD rop4, _In_ DWORD crBackColor, _In_ FLONG fl)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiUnrealizeObject(_In_ HANDLE h)
__kernel_entry W32KAPI HRGN APIENTRY NtGdiCreateRectRgn(_In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
__kernel_entry W32KAPI HBITMAP APIENTRY NtGdiSelectBitmap(_In_ HDC hdc, _In_ HBITMAP hbm)
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:104
#define _SEH2_END
Definition: pseh2_64.h:194
#define _SEH2_TRY
Definition: pseh2_64.h:93
#define WM_CONTEXTMENU
Definition: richedit.h:64
#define WM_PRINTCLIENT
Definition: richedit.h:70
const WCHAR * str
#define memset(x, y, z)
Definition: compat.h:39
#define TRACE(s)
Definition: solgame.cpp:4
struct _CURICON_OBJECT * spcur
Definition: ntuser.h:586
struct _CURICON_OBJECT * spicn
Definition: ntuser.h:585
HBRUSH hbrBackground
Definition: ntuser.h:587
UINT style
Definition: ntuser.h:580
Definition: region.h:8
DWORD dwForegroundFlashCount
Definition: sysparams.h:157
struct _DESKTOP * rpdesk
Definition: ntuser.h:194
FLONG TIF_flags
Definition: win32.h:95
struct _USER_MESSAGE_QUEUE * MessageQueue
Definition: win32.h:89
Definition: object.h:4
Definition: ntuser.h:694
PCLS pcls
Definition: ntuser.h:720
struct _WND * spwndOwner
Definition: ntuser.h:715
THRDESKHEAD head
Definition: ntuser.h:695
struct _WND * spwndLastActive
Definition: ntuser.h:739
DWORD style
Definition: ntuser.h:706
DWORD state2
Definition: ntuser.h:702
RECT rcClient
Definition: ntuser.h:717
LARGE_UNICODE_STRING strName
Definition: ntuser.h:736
DWORD state
Definition: ntuser.h:701
UINT_PTR IDMenu
Definition: ntuser.h:731
struct _WND::@5611 InternalPos
struct _WND * spwndNext
Definition: ntuser.h:711
struct _WND * spwndParent
Definition: ntuser.h:713
POINT MousePos
Definition: winuser.h:3425
int iCtrlId
Definition: winuser.h:3422
DWORD_PTR dwContextId
Definition: winuser.h:3424
HANDLE hItemHandle
Definition: winuser.h:3423
int iContextType
Definition: winuser.h:3421
UINT cbSize
Definition: winuser.h:3420
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG right
Definition: windef.h:108
LONG bottom
Definition: windef.h:109
LONG top
Definition: windef.h:107
LONG left
Definition: windef.h:106
ATOM atomIconProp
Definition: ntuser.h:1066
DWORD dwSRVIFlags
Definition: ntuser.h:1051
ATOM atomIconSmProp
Definition: ntuser.h:1065
#define max(a, b)
Definition: svc.c:63
#define ICON_BIG
Definition: tnclass.cpp:51
#define ICON_SMALL
Definition: tnclass.cpp:48
#define WM_MOUSEWHEEL
Definition: treelist.c:96
uint16_t * PWSTR
Definition: typedefs.h:56
const uint16_t * PCWSTR
Definition: typedefs.h:57
const uint16_t * LPCWSTR
Definition: typedefs.h:57
uint16_t * LPWSTR
Definition: typedefs.h:56
int32_t INT
Definition: typedefs.h:58
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define MAKELONG(a, b)
Definition: typedefs.h:249
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
#define DCX_KEEPCLIPRGN
Definition: undocuser.h:69
#define TPM_SYSTEM_MENU
Definition: undocuser.h:74
#define WM_NCUAHDRAWCAPTION
Definition: undocuser.h:48
#define DC_FRAME
Definition: undocuser.h:150
#define WM_LOGONNOTIFY
Definition: undocuser.h:39
#define LN_START_SCREENSAVE
Definition: undocuser.h:122
#define LN_MESSAGE_BEEP
Definition: undocuser.h:121
#define WM_CLIENTSHUTDOWN
Definition: undocuser.h:37
#define WM_POPUPSYSTEMMENU
Definition: undocuser.h:62
#define WM_CBT
Definition: undocuser.h:64
#define WM_NCUAHDRAWFRAME
Definition: undocuser.h:49
BOOL FASTCALL IntFlashWindowEx(PWND pWnd, PFLASHWINFO pfwi)
Definition: painting.c:1311
HDC FASTCALL IntBeginPaint(PWND Window, PPAINTSTRUCT Ps)
Definition: painting.c:1441
BOOL FASTCALL co_UserRedrawWindow(PWND Window, const RECTL *UpdateRect, PREGION UpdateRgn, ULONG Flags)
Definition: painting.c:895
BOOL FASTCALL IntEndPaint(PWND Wnd, PPAINTSTRUCT Ps)
Definition: painting.c:1537
INT FASTCALL co_UserGetUpdateRgn(PWND Window, HRGN hRgn, BOOL bErase)
Definition: painting.c:1788
DWORD FASTCALL IntGetWindowContextHelpId(PWND pWnd)
Definition: window.c:439
PWND FASTCALL UserGetWindowObject(HWND hWnd)
Definition: window.c:123
HDC FASTCALL UserGetWindowDC(PWND Wnd)
Definition: windc.c:947
PWND FASTCALL UserGetAncestor(PWND Wnd, UINT Type)
BOOLEAN co_UserDestroyWindow(PVOID Object)
Definition: window.c:2865
INT FASTCALL UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint)
Definition: windc.c:918
BOOL APIENTRY DefSetText(PWND Wnd, PCWSTR WindowText)
Definition: window.c:4385
HDC FASTCALL UserGetDCEx(PWND Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFDEVICE Child
Definition: wdffdo.h:536
BOOL NTAPI GreDeleteObject(HGDIOBJ hobj)
Definition: gdiobj.c:1165
FORCEINLINE BOOL RECTL_bIsEmptyRect(_In_ const RECTL *prcl)
Definition: rect.h:44
PREGION FASTCALL REGION_LockRgn(_In_ HRGN hrgn)
Definition: region.c:2358
VOID FASTCALL REGION_UnlockRgn(_In_ PREGION prgn)
Definition: region.c:2373
#define ValidateHwndNoErr(hwnd)
Definition: precomp.h:97
BOOL NTAPI UserEmptyClipboard(VOID)
Definition: clipboard.c:680
BOOL NTAPI UserCloseClipboard(VOID)
Definition: clipboard.c:545
BOOL NTAPI UserOpenClipboard(HWND hWnd)
Definition: clipboard.c:488
HANDLE NTAPI UserSetClipboardData(UINT fmt, HANDLE hData, PSETCLIPBDATA scd)
Definition: clipboard.c:1023
PCURICON_OBJECT IntSystemSetCursor(PCURICON_OBJECT pcurNew)
Definition: cursoricon.c:230
BOOL UserDrawIconEx(HDC hDc, INT xLeft, INT yTop, PCURICON_OBJECT pIcon, INT cxWidth, INT cyHeight, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags)
Definition: cursoricon.c:1691
PWND FASTCALL UserGetDesktopWindow(VOID)
Definition: desktop.c:1402
VOID co_IntShellHookNotify(WPARAM Message, WPARAM wParam, LPARAM lParam)
Definition: desktop.c:1704
PWND FASTCALL co_GetDesktopWindow(PWND pWnd)
Definition: desktop.c:1383
VOID FASTCALL IntNotifyWinEvent(DWORD Event, PWND pWnd, LONG idObject, LONG idChild, DWORD flags)
Definition: event.c:178
UINT FASTCALL DefWndGetHotKey(PWND pWnd)
Definition: hotkey.c:336
INT FASTCALL DefWndSetHotKey(PWND pWnd, WPARAM wParam)
Definition: hotkey.c:361
BYTE gafAsyncKeyState[256 *2/8]
Definition: keyboard.c:13
#define IS_KEY_DOWN(ks, vk)
Definition: input.h:102
PMENU FASTCALL IntGetSystemMenu(PWND Window, BOOL bRevert)
Definition: menu.c:5409
BOOL FASTCALL UserSetMenuDefaultItem(PMENU MenuObject, UINT uItem, UINT fByPos)
Definition: menu.c:1274
INT FASTCALL IntMenuItemFromPoint(PWND pWnd, HMENU hMenu, POINT ptScreen)
Definition: menu.c:1518
PWND MENU_IsMenuActive(VOID)
Definition: menu.c:2650
void MENU_EndMenu(PWND pwnd)
Definition: menu.c:2662
void FASTCALL MENU_InitSysMenuPopup(PMENU menu, DWORD style, DWORD clsStyle, LONG HitTest)
Definition: menu.c:1362
BOOL FASTCALL IntTrackPopupMenuEx(_Inout_ PMENU menu, _In_ UINT wFlags, _In_ INT x, _In_ INT y, _In_ PWND pWnd, _In_opt_ const TPMPARAMS *lpTpm)
Definition: menu.c:4575
VOID MENU_TrackKbdMenuBar(PWND pwnd, UINT wParam, WCHAR wChar)
Definition: menu.c:4516
VOID MENU_TrackMouseMenuBar(PWND pWnd, ULONG ht, POINT pt)
Definition: menu.c:4486
BOOL FASTCALL UserPostMessage(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1395
LRESULT FASTCALL co_IntSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1495
LONG NTAPI UserGetSystemMetrics(ULONG Index)
Definition: metric.c:209
LRESULT NC_HandleNCLButtonDown(PWND pWnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1574
VOID UserDrawCaptionBar(PWND pWnd, HDC hDC, INT Flags)
Definition: nonclient.c:955
DWORD FASTCALL GetNCHitEx(PWND pWnd, POINT pt)
Definition: nonclient.c:1984
VOID FASTCALL DefWndDoSizeMove(PWND pwnd, WORD wParam)
Definition: nonclient.c:254
LRESULT NC_HandleNCActivate(PWND Wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1437
LRESULT NC_DoNCPaint(PWND pWnd, HDC hDC, INT Flags)
Definition: nonclient.c:1097
LRESULT NC_HandleNCCalcSize(PWND Wnd, WPARAM wparam, RECTL *Rect, BOOL Suspended)
Definition: nonclient.c:1303
LRESULT NC_HandleNCRButtonDown(PWND pwnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1724
LRESULT NC_HandleNCLButtonDblClk(PWND pWnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1666
BOOL FASTCALL UserDereferenceObject(PVOID Object)
Definition: object.c:643
VOID FASTCALL UserReferenceObject(PVOID obj)
Definition: object.c:730
HANDLE FASTCALL UserGetProp(_In_ PWND Window, _In_ ATOM Atom, _In_ BOOLEAN SystemProp)
Definition: prop.c:46
LRESULT IntClientShutdown(IN PWND pWindow, IN WPARAM wParam, IN LPARAM lParam)
Definition: shutdown.c:22
BOOL g_bWindowSnapEnabled
Definition: sysparams.c:20
SPIVALUES gspv
Definition: sysparams.c:17
ULONG FASTCALL IntSetStyle(PWND pwnd, ULONG set_bits, ULONG clear_bits)
Definition: window.c:144
PWND FASTCALL IntGetParent(PWND Wnd)
Definition: window.c:205
BOOL FASTCALL IntShowOwnedPopups(PWND OwnerWnd, BOOL fShow)
Definition: window.c:4662
BOOL FASTCALL IntIsWindowVisible(PWND Wnd)
Definition: window.c:190
#define OBJID_WINDOW
Definition: winable.h:15
#define CHILDID_SELF
Definition: winable.h:14
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:21
DWORD COLORREF
Definition: windef.h:100
INT FASTCALL IntMapWindowPoints(PWND FromWnd, PWND ToWnd, LPPOINT lpPoints, UINT cPoints)
Definition: winpos.c:144
VOID FASTCALL IntGetClientRect(PWND WindowObject, RECTL *Rect)
Definition: winpos.c:92
#define WINAPI
Definition: msvc.h:6
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define WM_CTLCOLOR
Definition: windowsx.h:29
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
#define DI_COMPAT
Definition: wingdi.h:68
#define NULLREGION
Definition: wingdi.h:361
#define DI_NORMAL
Definition: wingdi.h:72
#define CLR_INVALID
Definition: wingdi.h:883
#define SRCCOPY
Definition: wingdi.h:333
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
#define DI_DEFAULTSIZE
Definition: wingdi.h:69
FORCEINLINE VOID co_IntUnsnapWindow(PWND Wnd)
Definition: winpos.h:89
FORCEINLINE BOOLEAN IntIsSnapAllowedForWindow(PWND Wnd)
Definition: winpos.h:101
#define WM_PAINT
Definition: winuser.h:1648
#define HTTOPRIGHT
Definition: winuser.h:2528
#define WM_ERASEBKGND
Definition: winuser.h:1653
#define SC_MOUSEMENU
Definition: winuser.h:2631
#define WM_GETHOTKEY
Definition: winuser.h:1681
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1800
#define WM_GETTEXTLENGTH
Definition: winuser.h:1647
#define SW_HIDE
Definition: winuser.h:779
#define CTLCOLOR_SCROLLBAR
Definition: winuser.h:967
#define WM_CLOSE
Definition: winuser.h:1649
#define SWP_NOACTIVATE
Definition: winuser.h:1253
#define VK_SNAPSHOT
Definition: winuser.h:2267
#define WM_SYSCOMMAND
Definition: winuser.h:1769
#define SC_KEYMENU
Definition: winuser.h:2632
#define VK_TAB
Definition: winuser.h:2235
#define GA_ROOT
Definition: winuser.h:2893
#define MAKELPARAM(l, h)
Definition: winuser.h:4116
#define WM_KEYUP
Definition: winuser.h:1744
#define COLOR_WINDOW
Definition: winuser.h:929
#define COLOR_SCROLLBAR
Definition: winuser.h:923
#define PRF_NONCLIENT
Definition: winuser.h:2560
#define HTCAPTION
Definition: winuser.h:2512
#define DCX_WINDOW
Definition: winuser.h:2149
#define HELPINFO_MENUITEM
Definition: winuser.h:1182
#define VK_F10
Definition: winuser.h:2300
#define WM_SETHOTKEY
Definition: winuser.h:1680
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1689
#define HTTOPLEFT
Definition: winuser.h:2527
#define COLOR_WINDOWTEXT
Definition: winuser.h:932
#define TPM_RIGHTBUTTON
Definition: winuser.h:2416
#define WM_SYNCPAINT
Definition: winuser.h:1718
#define CTLCOLOR_LISTBOX
Definition: winuser.h:964
#define SW_MINIMIZE
Definition: winuser.h:787
#define HTBOTTOM
Definition: winuser.h:2529
#define SC_PREVWINDOW
Definition: winuser.h:2627
#define VK_SPACE
Definition: winuser.h:2255
#define WM_SIZE
Definition: winuser.h:1639
#define PRF_ERASEBKGND
Definition: winuser.h:2562
#define HTERROR
Definition: winuser.h:2508
#define WM_CANCELMODE
Definition: winuser.h:1663
#define DT_TABSTOP
Definition: winuser.h:541
#define WM_LBUTTONDBLCLK
Definition: winuser.h:1806
#define SWP_NOMOVE
Definition: winuser.h:1255
#define KF_ALTDOWN
Definition: winuser.h:2485
#define HTVSCROLL
Definition: winuser.h:2518
#define MA_ACTIVATE
Definition: winuser.h:2537
#define HTHSCROLL
Definition: winuser.h:2517
#define WM_APPCOMMAND
Definition: winuser.h:1910
#define WM_NCHITTEST
Definition: winuser.h:1714
#define WM_RBUTTONUP
Definition: winuser.h:1808
#define VK_UP
Definition: winuser.h:2261
#define SW_SHOWNOACTIVATE
Definition: winuser.h:785
#define SWP_NOSIZE
Definition: winuser.h:1256
#define WH_SHELL
Definition: winuser.h:40
#define WM_GETTEXT
Definition: winuser.h:1646
#define RDW_ERASE
Definition: winuser.h:1222
#define CTLCOLOR_EDIT
Definition: winuser.h:963
#define SIZE_MINIMIZED
Definition: winuser.h:2542
#define WM_CTLCOLORSCROLLBAR
Definition: winuser.h:1799
#define WA_INACTIVE
Definition: winuser.h:2664
#define MA_NOACTIVATE
Definition: winuser.h:2539
#define WM_LBUTTONDOWN
Definition: winuser.h:1804
#define WM_DEVICECHANGE
Definition: winuser.h:1839
#define WH_CBT
Definition: winuser.h:35
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1654
#define PRF_OWNED
Definition: winuser.h:2564
#define PRF_CHILDREN
Definition: winuser.h:2563
#define WM_CTLCOLORMSGBOX
Definition: winuser.h:1794
#define WM_NCLBUTTONDBLCLK
Definition: winuser.h:1722
#define SC_SIZE
Definition: winuser.h:2620
#define WM_ACTIVATE
Definition: winuser.h:1640
#define WM_SHOWWINDOW
Definition: winuser.h:1656
#define WM_RBUTTONDOWN
Definition: winuser.h:1807
#define SC_MINIMIZE
Definition: winuser.h:2622
#define WM_CTLCOLORBTN
Definition: winuser.h:1797
#define WM_SETTEXT
Definition: winuser.h:1645
#define SC_NEXTWINDOW
Definition: winuser.h:2626
#define DC_NC
Definition: winuser.h:440
#define DCX_INTERSECTRGN
Definition: winuser.h:2158
#define WM_NCACTIVATE
Definition: winuser.h:1716
#define WM_SYSCHAR
Definition: winuser.h:1749
#define VK_RETURN
Definition: winuser.h:2237
#define SM_CYICON
Definition: winuser.h:984
#define SIZE_MAXIMIZED
Definition: winuser.h:2543
#define VK_RMENU
Definition: winuser.h:2323
#define RDW_ALLCHILDREN
Definition: winuser.h:1232
#define HTRIGHT
Definition: winuser.h:2525
#define RDW_ERASENOW
Definition: winuser.h:1230
#define RDW_FRAME
Definition: winuser.h:1223
#define HTCLIENT
Definition: winuser.h:2511
#define WM_SYSKEYUP
Definition: winuser.h:1748
#define SC_HOTKEY
Definition: winuser.h:2637
#define HCBT_MOVESIZE
Definition: winuser.h:55
#define HTBOTTOMRIGHT
Definition: winuser.h:2531
#define HTNOWHERE
Definition: winuser.h:2510
#define SC_CLOSE
Definition: winuser.h:2628
#define DC_TEXT
Definition: winuser.h:430
#define SC_MOVE
Definition: winuser.h:2621
#define VK_LWIN
Definition: winuser.h:2271
struct tagHELPINFO HELPINFO
#define WM_MOUSEACTIVATE
Definition: winuser.h:1665
#define PRF_CLIENT
Definition: winuser.h:2561
#define TPM_LEFTBUTTON
Definition: winuser.h:2415
#define VK_F4
Definition: winuser.h:2294
#define WM_MOVE
Definition: winuser.h:1638
#define VK_LEFT
Definition: winuser.h:2260
#define VK_RIGHT
Definition: winuser.h:2262
#define SIZE_RESTORED
Definition: winuser.h:2541
#define HTBOTTOMLEFT
Definition: winuser.h:2530
#define HTTOP
Definition: winuser.h:2526
#define VK_DOWN
Definition: winuser.h:2263
#define COLOR_3DHILIGHT
Definition: winuser.h:948
#define PRF_CHECKVISIBLE
Definition: winuser.h:2559
#define SW_RESTORE
Definition: winuser.h:790
#define WM_SETCURSOR
Definition: winuser.h:1664
#define KF_REPEAT
Definition: winuser.h:2486
#define WM_USER
Definition: winuser.h:1923
#define WM_CTLCOLORLISTBOX
Definition: winuser.h:1796
#define VK_SHIFT
Definition: winuser.h:2238
#define DC_ICON
Definition: winuser.h:429
#define WM_NCRBUTTONUP
Definition: winuser.h:1724
#define WM_KEYDOWN
Definition: winuser.h:1743
#define WM_ICONERASEBKGND
Definition: winuser.h:1670
#define SW_MAXIMIZE
Definition: winuser.h:783
#define HTSYSMENU
Definition: winuser.h:2513
#define HTLEFT
Definition: winuser.h:2523
#define WM_PRINT
Definition: winuser.h:1908
#define WM_NCCALCSIZE
Definition: winuser.h:1713
#define CS_PARENTDC
Definition: winuser.h:664
#define SM_CXICON
Definition: winuser.h:983
#define RDW_VALIDATE
Definition: winuser.h:1229
#define WM_CTLCOLOREDIT
Definition: winuser.h:1795
#define VK_ESCAPE
Definition: winuser.h:2250
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1690
#define SC_RESTORE
Definition: winuser.h:2634
#define WM_CTLCOLORDLG
Definition: winuser.h:1798
#define CS_NOCLOSE
Definition: winuser.h:662
#define WM_SYSKEYDOWN
Definition: winuser.h:1747
#define WM_NCLBUTTONDOWN
Definition: winuser.h:1720
#define HCBT_SYSCOMMAND
Definition: winuser.h:63
#define RDW_INVALIDATE
Definition: winuser.h:1225
#define WM_PAINTICON
Definition: winuser.h:1669
#define WM_MBUTTONDOWN
Definition: winuser.h:1810
#define VK_RWIN
Definition: winuser.h:2272
#define SC_MAXIMIZE
Definition: winuser.h:2624
#define VK_LMENU
Definition: winuser.h:2322
#define VK_MENU
Definition: winuser.h:2240
#define WM_NCPAINT
Definition: winuser.h:1715
#define WM_NCRBUTTONDOWN
Definition: winuser.h:1723
#define COLOR_3DFACE
Definition: winuser.h:940
#define WM_SETREDRAW
Definition: winuser.h:1644
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_ ULONG _In_ BOOLEAN Active
Definition: potypes.h:564