ReactOS 0.4.15-dev-7788-g1ad9096
defwnd.c
Go to the documentation of this file.
1/*
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS user32.dll
5 * FILE: win32ss/user/user32/windows/defwnd.c
6 * PURPOSE: Window management
7 * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
8 * UPDATE HISTORY:
9 * 06-06-2001 CSH Created
10 */
11
12#include <user32.h>
13#include <immdev.h>
14
16
17/*
18 * @implemented
19 */
23GetSysColor(int nIndex)
24{
25 if(nIndex >= 0 && nIndex < NUM_SYSCOLORS)
26 {
27 return gpsi->argbSystem[nIndex];
28 }
29
31 return 0;
32}
33
34/*
35 * @implemented
36 */
37HBRUSH
41{
42 if(nIndex >= 0 && nIndex < NUM_SYSCOLORS)
43 {
44 return gpsi->ahbrSystem[nIndex];
45 }
46
47 return NULL;
48}
49
50/*
51 * @implemented
52 */
53BOOL
56 int cElements,
57 CONST INT *lpaElements,
58 CONST COLORREF *lpaRgbValues)
59{
60 return NtUserSetSysColors(cElements, lpaElements, lpaRgbValues, 0);
61}
62
63BOOL
66{
67 BOOL Ret;
68 LARGE_STRING lsString;
69
70 if ( String )
71 {
72 if ( Ansi )
74 else
76 }
77 Ret = NtUserDefSetText(hWnd, (String ? &lsString : NULL));
78
79 return Ret;
80}
81
84{
85 HWND Ret;
86 PWND Child, OwnerWnd, Root, Owner;
87
89 Owner = ValidateHwnd(hOwner);
90
91 for( Child = Root->spwndChild ? DesktopPtrToUser(Root->spwndChild) : NULL;
92 Child;
93 Child = Child->spwndNext ? DesktopPtrToUser(Child->spwndNext) : NULL )
94 {
95 OwnerWnd = Child->spwndOwner ? DesktopPtrToUser(Child->spwndOwner) : NULL;
96 if(!OwnerWnd)
97 continue;
98
99 if (!(Child->style & WS_POPUP) || !(Child->style & WS_VISIBLE))
100 continue;
101
102 if(OwnerWnd == Owner)
103 {
104 Ret = Child->head.h;
105 return Ret;
106 }
107 }
108 ERR("IDCWTO Nothing found\n");
109 return NULL;
110}
111
112/***********************************************************************
113 * DefWndTrackScrollBar
114 *
115 * Track a mouse button press on the horizontal or vertical scroll-bar.
116 */
117static VOID
119{
120 INT ScrollBar;
121
122 if (SC_HSCROLL == (wParam & 0xfff0))
123 {
124 if (HTHSCROLL != (wParam & 0x0f))
125 {
126 return;
127 }
128 ScrollBar = SB_HORZ;
129 }
130 else /* SC_VSCROLL */
131 {
132 if (HTVSCROLL != (wParam & 0x0f))
133 {
134 return;
135 }
136 ScrollBar = SB_VERT;
137 }
138 ScrollTrackScrollBar(Wnd, ScrollBar, Pt );
139}
140
142
145{
146 POINT Pt;
147 LRESULT lResult;
148
149 if (!IsWindowEnabled( hWnd )) return 0;
150
151 switch (wParam & 0xfff0)
152 {
153 case SC_MOVE:
154 case SC_SIZE:
155// case SC_DEFAULT:
156 case SC_MOUSEMENU:
157 case SC_KEYMENU:
158 case SC_SCREENSAVE:
159 case SC_MINIMIZE:
160 case SC_MAXIMIZE:
161 case SC_RESTORE:
162 case SC_CLOSE:
163 case SC_HOTKEY:
165 return 0;
166
167 default:
168 break;
169 }
170
171 if (ISITHOOKED(WH_CBT))
172 {
174 if (lResult) return 0;
175 }
176
177 switch (wParam & 0xfff0)
178 {
179
180 case SC_VSCROLL:
181 case SC_HSCROLL:
182 {
183 Pt.x = (short)LOWORD(lParam);
184 Pt.y = (short)HIWORD(lParam);
186 }
187 break;
188
189 case SC_TASKLIST:
190 WinExec( "taskman.exe", SW_SHOWNORMAL );
191 break;
192
193
194 case SC_NEXTWINDOW:
195 case SC_PREVWINDOW:
197 break;
198
199 default:
200 FIXME("Unimplemented DefWndHandleSysCommand wParam 0x%x\n",wParam);
201 break;
202 }
203
204 return(0);
205}
206
207/***********************************************************************
208 * DefWndControlColor
209 *
210 * Default colors for control painting.
211 */
212HBRUSH
214{
215 if (ctlType == CTLCOLOR_SCROLLBAR)
216 {
220 SetBkColor(hDC, bk);
221
222 /* if COLOR_WINDOW happens to be the same as COLOR_3DHILIGHT
223 * we better use 0x55aa bitmap brush to make scrollbar's background
224 * look different from the window background.
225 */
226 if ( bk == GetSysColor(COLOR_WINDOW))
227 return gpsi->hbrGray;
228
229 UnrealizeObject( hb );
230 return hb;
231 }
232
234
235 if ((ctlType == CTLCOLOR_EDIT) || (ctlType == CTLCOLOR_LISTBOX))
236 {
238 }
239 else
240 {
243 }
244
246}
247
248static BOOL CALLBACK
250{
251 SendMessageW(hwnd, WM_UPDATEUISTATE, (WPARAM)lParam, 0);
252 return TRUE;
253}
254
255/* WARNING: Redundant with /ntuser/defwnd.c!UserPaintCaption !!
256 Use TWOPARAM_ROUTINE_REDRAWTITLE/REDRAWFRAME or HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK .
257 */
258static void
260{
261 if ( pwnd->style & WS_VISIBLE && (pwnd->style & WS_CAPTION) == WS_CAPTION )
262 {
264 Flags |= DC_ACTIVE;
265 /*
266 * When themes are not enabled we can go on and paint the non client area.
267 * However if we do that with themes enabled we will draw a classic frame.
268 * This is solved by sending a themes specific message to notify the themes
269 * engine that the caption needs to be redrawn
270 */
272 {
273 /*
274 * This will cause uxtheme to either paint the themed caption or call
275 * RealUserDrawCaption in order to draw the classic caption when themes
276 * are disabled but the themes service is enabled
277 */
279 }
280 else
281 {
282 RECT rc = {0,0,0,0};
286 }
287 }
288 //NtUserCallTwoParam((DWORD_PTR)UserHMGetHandle(pwnd),Flags,TWOPARAM_ROUTINE_REDRAWTITLE)
289}
290
293{
294 HICON hIconRet;
295 if ( wParam > ICON_SMALL2 )
296 {
298 return 0;
299 }
300 switch(wParam)
301 {
302 case ICON_BIG:
303 hIconRet = UserGetProp(UserHMGetHandle(pWnd), gpsi->atomIconProp, TRUE);
304 break;
305 case ICON_SMALL:
306 case ICON_SMALL2:
308 break;
309 default:
310 break;
311 }
312 return (LRESULT)hIconRet;
313}
314
315
318 UINT Msg,
321 BOOL bUnicode)
322{
323 PWND pWnd = NULL;
324 if (hWnd)
325 {
326 pWnd = ValidateHwnd(hWnd);
327 if (!pWnd) return 0;
328 }
329
330 switch (Msg)
331 {
332 case WM_DEVICECHANGE:
333 return TRUE;
334
336 {
337 /* This is an undocumented message used by the windows taskbar to
338 display the system menu of windows that belong to other processes. */
339 HMENU menu = GetSystemMenu(hWnd, FALSE);
340 ERR("WM_POPUPSYSTEMMENU\n");
341 if (menu)
342 {
346 }
347 return 0;
348 }
349
350 case WM_RBUTTONUP:
351 {
352 POINT Pt;
353 Pt.x = GET_X_LPARAM(lParam);
354 Pt.y = GET_Y_LPARAM(lParam);
355 ClientToScreen(hWnd, &Pt);
356 lParam = MAKELPARAM(Pt.x, Pt.y);
357 if (bUnicode)
358 {
360 }
361 else
362 {
364 }
365 break;
366 }
367
368 case WM_NCRBUTTONUP:
369 /*
370 * FIXME : we must NOT send WM_CONTEXTMENU on a WM_NCRBUTTONUP (checked
371 * in Windows), but what _should_ we do? According to MSDN :
372 * "If it is appropriate to do so, the system sends the WM_SYSCOMMAND
373 * message to the window". When is it appropriate?
374 */
375 ERR("WM_NCRBUTTONUP\n");
376 break;
377
378 case WM_XBUTTONUP:
379 case WM_NCXBUTTONUP:
380 if (HIWORD(wParam) == XBUTTON1 || HIWORD(wParam) == XBUTTON2)
381 {
383 MAKELPARAM(LOWORD(wParam), FAPPCOMMAND_MOUSE | HIWORD(wParam)));
384 }
385 break;
386
387 case WM_CONTEXTMENU:
388 {
390 {
391 if (bUnicode)
392 {
394 }
395 else
396 {
398 }
399 }
400 else
401 {
402 goto GoSS;
403 }
404 break;
405 }
406
407 case WM_CLOSE:
409 return (0);
410
411 case WM_MOUSEACTIVATE:
413 {
415 if (Ret) return (Ret);
416 }
418
419 case WM_ACTIVATE:
420 /* The default action in Windows is to set the keyboard focus to
421 * the window, if it's being activated and not minimized */
422 if (LOWORD(wParam) != WA_INACTIVE &&
424 {
425 //ERR("WM_ACTIVATE %p\n",hWnd);
426 SetFocus(hWnd);
427 }
428 break;
429
430 case WM_MOUSEWHEEL:
433 break;
434
435 case WM_ERASEBKGND:
437 {
438 RECT Rect;
439 HBRUSH hBrush = (HBRUSH)GetClassLongPtrW(hWnd, GCL_HBRBACKGROUND);
440
441 if (NULL == hBrush)
442 {
443 return 0;
444 }
446 {
447 /* can't use GetClipBox with a parent DC or we fill the whole parent */
449 DPtoLP((HDC)wParam, (LPPOINT)&Rect, 2);
450 }
451 else
452 {
454 }
455 FillRect((HDC)wParam, &Rect, hBrush);
456 return (1);
457 }
458
460 case WM_CTLCOLOREDIT:
462 case WM_CTLCOLORBTN:
463 case WM_CTLCOLORDLG:
467
468 case WM_CTLCOLOR:
470
471 case WM_SYSCOMMAND:
473
474 case WM_VKEYTOITEM:
475 case WM_CHARTOITEM:
476 return (-1);
477/*
478 case WM_DROPOBJECT:
479 return DRAG_FILE;
480*/
482 {
484 {
485 return(1);
486 }
487 break;
488 }
489
490 case WM_QUERYDRAGICON:
491 {
492 UINT Len;
493 HICON hIcon;
494
496 if (hIcon)
497 {
498 return ((LRESULT)hIcon);
499 }
500 for (Len = 1; Len < 64; Len++)
501 {
503 {
504 return((LRESULT)hIcon);
505 }
506 }
507 return ((LRESULT)LoadIconW(0, IDI_APPLICATION));
508 }
509
510 case WM_ISACTIVEICON:
511 {
512 BOOL isai;
513 isai = (pWnd->state & WNDS_ACTIVEFRAME) != 0;
514 return isai;
515 }
516
517 case WM_NOTIFYFORMAT:
518 {
519 if (lParam == NF_QUERY)
521 break;
522 }
523
524 case WM_GETICON:
525 {
526 return DefWndGetIcon(pWnd, wParam, lParam);
527 }
528
529 case WM_HELP:
530 {
531 if (bUnicode)
532 {
534 }
535 else
536 {
538 }
539 break;
540 }
541
542 case WM_QUERYOPEN:
544 {
545 return (1);
546 }
547
548 case WM_INPUTLANGCHANGEREQUEST:
549 {
550 HKL hNewKL;
551 HWND hwndFocus;
552
553 if ((wParam & INPUTLANGCHANGE_BACKWARD) && (wParam & INPUTLANGCHANGE_FORWARD))
554 return FALSE;
555
556 hwndFocus = GetFocus();
557 if (hwndFocus && hwndFocus != hWnd &&
559 {
560 return SendMessageW(hwndFocus, Msg, wParam, lParam);
561 }
562
563 if (wParam & INPUTLANGCHANGE_FORWARD)
564 hNewKL = (HKL)UlongToHandle(HKL_NEXT);
565 else if (wParam & INPUTLANGCHANGE_BACKWARD)
566 hNewKL = (HKL)UlongToHandle(HKL_PREV);
567 else
568 hNewKL = (HKL)lParam;
569
571 return TRUE;
572 }
573
574 case WM_INPUTLANGCHANGE:
575 {
576 int count = 0;
577 HWND *win_array = WIN_ListChildren( hWnd );
578
579 if (!win_array)
580 break;
581 while (win_array[count])
582 SendMessageW( win_array[count++], WM_INPUTLANGCHANGE, wParam, lParam);
583 HeapFree(GetProcessHeap(),0,win_array);
584 break;
585 }
586
587 case WM_QUERYUISTATE:
588 {
589 LRESULT Ret = 0;
590 PWND Wnd = ValidateHwnd(hWnd);
591 if (Wnd != NULL)
592 {
593 if (Wnd->HideFocus)
594 Ret |= UISF_HIDEFOCUS;
595 if (Wnd->HideAccel)
596 Ret |= UISF_HIDEACCEL;
597 }
598 return Ret;
599 }
600
601 case WM_CHANGEUISTATE:
602 {
603 BOOL AlwaysShowCues = FALSE;
606 PWND Wnd;
607
608 SystemParametersInfoW(SPI_GETKEYBOARDCUES, 0, &AlwaysShowCues, 0);
609 if (AlwaysShowCues)
610 break;
611
612 Wnd= ValidateHwnd(hWnd);
613 if (!Wnd || lParam != 0)
614 break;
615
616 if (Flags & ~(UISF_HIDEFOCUS | UISF_HIDEACCEL | UISF_ACTIVE))
617 break;
618
619 if (Flags & UISF_ACTIVE)
620 {
621 WARN("WM_CHANGEUISTATE does not yet support UISF_ACTIVE!\n");
622 }
623
624 if (Action == UIS_INITIALIZE)
625 {
627 if (Desk == NULL)
628 break;
629
630 Action = Desk->LastInputWasKbd ? UIS_CLEAR : UIS_SET;
631 Flags = UISF_HIDEFOCUS | UISF_HIDEACCEL;
632
633 /* We need to update wParam in case we need to send out messages */
635 }
636
637 switch (Action)
638 {
639 case UIS_SET:
640 /* See if we actually need to change something */
641 if ((Flags & UISF_HIDEFOCUS) && !Wnd->HideFocus)
642 break;
643 if ((Flags & UISF_HIDEACCEL) && !Wnd->HideAccel)
644 break;
645
646 /* Don't need to do anything... */
647 return 0;
648
649 case UIS_CLEAR:
650 /* See if we actually need to change something */
651 if ((Flags & UISF_HIDEFOCUS) && Wnd->HideFocus)
652 break;
653 if ((Flags & UISF_HIDEACCEL) && Wnd->HideAccel)
654 break;
655
656 /* Don't need to do anything... */
657 return 0;
658
659 default:
660 WARN("WM_CHANGEUISTATE: Unsupported Action 0x%x\n", Action);
661 break;
662 }
663
664 if ((Wnd->style & WS_CHILD) && Wnd->spwndParent != NULL)
665 {
666 /* We're a child window and we need to pass this message down until
667 we reach the root */
669 }
670 else
671 {
672 /* We're a top level window, we need to change the UI state */
673 Msg = WM_UPDATEUISTATE;
674 }
675
676 if (bUnicode)
677 return SendMessageW(hWnd, Msg, wParam, lParam);
678 else
679 return SendMessageA(hWnd, Msg, wParam, lParam);
680 }
681
682 case WM_UPDATEUISTATE:
683 {
684 BOOL Change = TRUE;
685 BOOL AlwaysShowCues = FALSE;
688 PWND Wnd;
689
690 SystemParametersInfoW(SPI_GETKEYBOARDCUES, 0, &AlwaysShowCues, 0);
691 if (AlwaysShowCues)
692 break;
693
694 Wnd = ValidateHwnd(hWnd);
695 if (!Wnd || lParam != 0)
696 break;
697
698 if (Flags & ~(UISF_HIDEFOCUS | UISF_HIDEACCEL | UISF_ACTIVE))
699 break;
700
701 if (Flags & UISF_ACTIVE)
702 {
703 WARN("WM_UPDATEUISTATE does not yet support UISF_ACTIVE!\n");
704 }
705
706 if (Action == UIS_INITIALIZE)
707 {
709 if (Desk == NULL)
710 break;
711
712 Action = Desk->LastInputWasKbd ? UIS_CLEAR : UIS_SET;
713 Flags = UISF_HIDEFOCUS | UISF_HIDEACCEL;
714
715 /* We need to update wParam for broadcasting the update */
717 }
718
719 switch (Action)
720 {
721 case UIS_SET:
722 /* See if we actually need to change something */
723 if ((Flags & UISF_HIDEFOCUS) && !Wnd->HideFocus)
724 break;
725 if ((Flags & UISF_HIDEACCEL) && !Wnd->HideAccel)
726 break;
727
728 /* Don't need to do anything... */
729 Change = FALSE;
730 break;
731
732 case UIS_CLEAR:
733 /* See if we actually need to change something */
734 if ((Flags & UISF_HIDEFOCUS) && Wnd->HideFocus)
735 break;
736 if ((Flags & UISF_HIDEACCEL) && Wnd->HideAccel)
737 break;
738
739 /* Don't need to do anything... */
740 Change = FALSE;
741 break;
742
743 default:
744 WARN("WM_UPDATEUISTATE: Unsupported Action 0x%x\n", Action);
745 return 0;
746 }
747
748 /* Pack the information and call win32k */
749 if (Change)
750 {
751 if (!NtUserxUpdateUiState(hWnd, Flags | ((DWORD)Action << 3)))
752 break;
753 }
754
755 /* Always broadcast the update to all children */
758 (LPARAM)wParam);
759
760 break;
761 }
762
764 {
765 TRACE("WM_COPYGLOBALDATA hGlobal %p Size %d Flags 0x%x\n",lParam,wParam,GlobalFlags((HGLOBAL)lParam));
766 return lParam;
767 }
768
769/* Move to Win32k !*/
770 case WM_SHOWWINDOW:
771 if (!lParam) break; // Call when it is necessary.
772 case WM_LBUTTONDOWN:
773 case WM_RBUTTONDOWN:
774 case WM_MBUTTONDOWN:
775 case WM_NCLBUTTONDOWN:
776 case WM_NCRBUTTONDOWN:
777 case WM_LBUTTONDBLCLK:
779 case WM_KEYF1:
780 case WM_KEYUP:
781 case WM_SYSKEYUP:
782 case WM_KEYDOWN:
783 case WM_SYSKEYDOWN:
784 case WM_SYSCHAR:
785 case WM_CANCELMODE:
786 case WM_PAINTICON:
787 case WM_PAINT:
788 case WM_PRINT:
789 case WM_SETICON:
793 case WM_NCPAINT:
794 case WM_NCACTIVATE:
795 case WM_NCCALCSIZE:
796 case WM_NCHITTEST:
797 case WM_SYNCPAINT:
798 case WM_SETREDRAW:
800 case WM_GETHOTKEY:
801 case WM_SETHOTKEY:
804 case WM_APPCOMMAND:
805 case WM_SETCURSOR:
806GoSS:
807 {
808 LRESULT lResult;
810 return lResult;
811 }
812 }
813 return 0;
814}
815
816
819 UINT Msg,
822{
823 LRESULT Result = 0;
824 PWND Wnd;
825
826 Wnd = ValidateHwnd(hWnd);
827
828 if ( !Wnd &&
830 Msg != WM_CTLCOLORBTN &&
831 Msg != WM_CTLCOLORDLG &&
833 return 0;
834
836 switch (Msg)
837 {
838 case WM_NCCREATE:
839 {
840 if ( Wnd &&
841 Wnd->style & (WS_HSCROLL | WS_VSCROLL) )
842 {
843 if (!Wnd->pSBInfo)
844 {
845 SCROLLINFO si = {sizeof si, SIF_ALL, 0, 100, 0, 0, 0};
848 }
849 }
850
851 if (lParam)
852 {
854 /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP)
855 * may have child window IDs instead of window name */
856 if (HIWORD(cs->lpszName))
857 {
858 DefSetText(hWnd, (PCWSTR)cs->lpszName, TRUE);
859 }
860 Result = 1;
861 }
862 break;
863 }
864
865 case WM_GETTEXTLENGTH:
866 {
867 PWSTR buf;
868 ULONG len;
869
870 if (Wnd != NULL && Wnd->strName.Length != 0)
871 {
873 if (buf != NULL &&
875 buf,
876 Wnd->strName.Length)))
877 {
878 Result = (LRESULT) len;
879 }
880 }
881 else Result = 0L;
882
883 break;
884 }
885
886 case WM_GETTEXT:
887 {
888 PWSTR buf = NULL;
889 PSTR outbuf = (PSTR)lParam;
890 SIZE_T copy;
891
892 if (Wnd != NULL && wParam != 0)
893 {
894 if (Wnd->strName.Buffer != NULL)
896 else
897 outbuf[0] = L'\0';
898
899 if (buf != NULL)
900 {
901 if (Wnd->strName.Length != 0)
902 {
903 copy = min(Wnd->strName.Length / sizeof(WCHAR), wParam - 1);
905 0,
906 buf,
907 copy,
908 outbuf,
909 wParam,
910 NULL,
911 NULL);
912 outbuf[Result] = '\0';
913 }
914 else
915 outbuf[0] = '\0';
916 }
917 }
918 break;
919 }
920
921 case WM_SETTEXT:
922 {
924
926 {
928 IntNotifyWinEvent(EVENT_OBJECT_NAMECHANGE, hWnd, OBJID_WINDOW, CHILDID_SELF, 0);
929 }
930 Result = 1;
931 break;
932 }
933
934 case WM_IME_KEYDOWN:
935 {
937 break;
938 }
939
940 case WM_IME_KEYUP:
941 {
943 break;
944 }
945
946 case WM_IME_CHAR:
947 {
948 if (HIBYTE(wParam))
951 break;
952 }
953
954 case WM_IME_COMPOSITION:
955 if (lParam & GCS_RESULTSTR)
956 {
957 LONG size, i;
958 unsigned char lead = 0;
959 char *buf = NULL;
960 HIMC himc = IMM_FN(ImmGetContext)( hWnd );
961
962 if (himc)
963 {
965 {
966 if (!(buf = HeapAlloc( GetProcessHeap(), 0, size ))) size = 0;
968 }
969 IMM_FN(ImmReleaseContext)( hWnd, himc );
970
971 for (i = 0; i < size; i++)
972 {
973 unsigned char c = buf[i];
974 if (!lead)
975 {
976 if (IsDBCSLeadByte( c ))
977 lead = c;
978 else
980 }
981 else
982 {
983 SendMessageA( hWnd, WM_IME_CHAR, MAKEWORD(c, lead), 1 );
984 lead = 0;
985 }
986 }
987 HeapFree( GetProcessHeap(), 0, buf );
988 }
989 }
990 /* fall through */
991 case WM_IME_STARTCOMPOSITION:
992 case WM_IME_ENDCOMPOSITION:
993 case WM_IME_SELECT:
994 case WM_IME_NOTIFY:
995 case WM_IME_CONTROL:
997NormalImeMsgHandling:
998 {
999 HWND hwndIME;
1000
1001 if (GetWin32ClientInfo()->dwTIFlags & TIF_DISABLEIME)
1002 {
1003 TRACE("This thread's IME is disabled\n");
1004 break;
1005 }
1006
1007 hwndIME = IMM_FN(ImmGetDefaultIMEWnd)(hWnd);
1008 if (!hwndIME)
1009 {
1010 ERR("hwndIME was NULL\n");
1011 break;
1012 }
1013
1014 if (hwndIME == hWnd)
1015 {
1017 break;
1018 }
1019
1020 Result = SendMessageA(hwndIME, Msg, wParam, lParam);
1021 break;
1022 }
1023
1024 case WM_IME_SYSTEM:
1025 {
1026 if (wParam == 4)
1027 break;
1028
1029 goto NormalImeMsgHandling;
1030 }
1031
1032 default:
1034 }
1035
1037 return Result;
1038}
1039
1040
1043 UINT Msg,
1044 WPARAM wParam,
1045 LPARAM lParam)
1046{
1047 LRESULT Result = 0;
1048 PWND Wnd;
1049
1050 Wnd = ValidateHwnd(hWnd);
1051
1052 if ( !Wnd &&
1054 Msg != WM_CTLCOLORBTN &&
1055 Msg != WM_CTLCOLORDLG &&
1057 return 0;
1058
1060 switch (Msg)
1061 {
1062 case WM_NCCREATE:
1063 {
1064 if ( Wnd &&
1065 Wnd->style & (WS_HSCROLL | WS_VSCROLL) )
1066 {
1067 if (!Wnd->pSBInfo)
1068 {
1069 SCROLLINFO si = {sizeof si, SIF_ALL, 0, 100, 0, 0, 0};
1070 if (Wnd->style & WS_HSCROLL)
1071 SetScrollInfo( hWnd, SB_HORZ, &si, FALSE );
1072 if (Wnd->style & WS_VSCROLL)
1073 SetScrollInfo( hWnd, SB_VERT, &si, FALSE );
1074 }
1075 }
1076
1077 if (lParam)
1078 {
1080 /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP)
1081 * may have child window IDs instead of window name */
1082 if (HIWORD(cs->lpszName))
1083 {
1084 DefSetText(hWnd, cs->lpszName, FALSE);
1085 }
1086 Result = 1;
1087 }
1088 break;
1089 }
1090
1091 case WM_GETTEXTLENGTH:
1092 {
1093 PWSTR buf;
1094 ULONG len;
1095
1096 if (Wnd != NULL && Wnd->strName.Length != 0)
1097 {
1099 if (buf != NULL &&
1101 buf,
1102 Wnd->strName.Length)))
1103 {
1104 Result = (LRESULT) (Wnd->strName.Length / sizeof(WCHAR));
1105 }
1106 }
1107 else Result = 0L;
1108
1109 break;
1110 }
1111
1112 case WM_GETTEXT:
1113 {
1114 PWSTR buf = NULL;
1115 PWSTR outbuf = (PWSTR)lParam;
1116
1117 if (Wnd != NULL && wParam != 0)
1118 {
1119 if (Wnd->strName.Buffer != NULL)
1121 else
1122 outbuf[0] = L'\0';
1123
1124 if (buf != NULL)
1125 {
1126 if (Wnd->strName.Length != 0)
1127 {
1128 Result = min(Wnd->strName.Length / sizeof(WCHAR), wParam - 1);
1129 RtlCopyMemory(outbuf,
1130 buf,
1131 Result * sizeof(WCHAR));
1132 outbuf[Result] = L'\0';
1133 }
1134 else
1135 outbuf[0] = L'\0';
1136 }
1137 }
1138 break;
1139 }
1140
1141 case WM_SETTEXT:
1142 {
1144
1147 Result = 1;
1148 break;
1149 }
1150
1151 case WM_IME_CHAR:
1152 {
1154 Result = 0;
1155 break;
1156 }
1157
1158 case WM_IME_KEYDOWN:
1159 {
1161 break;
1162 }
1163
1164 case WM_IME_KEYUP:
1165 {
1167 break;
1168 }
1169
1170 case WM_IME_COMPOSITION:
1171 if (lParam & GCS_RESULTSTR)
1172 {
1173 LONG size, i;
1174 WCHAR *buf = NULL;
1175 HIMC himc = IMM_FN(ImmGetContext)( hWnd );
1176
1177 if (himc)
1178 {
1180 {
1181 if (!(buf = HeapAlloc( GetProcessHeap(), 0, size * sizeof(WCHAR) ))) size = 0;
1182 else size = IMM_FN(ImmGetCompositionStringW)( himc, GCS_RESULTSTR, buf, size * sizeof(WCHAR) );
1183 }
1184 IMM_FN(ImmReleaseContext)( hWnd, himc );
1185
1186 for (i = 0; i < size / sizeof(WCHAR); i++)
1188 HeapFree( GetProcessHeap(), 0, buf );
1189 }
1190 }
1191 /* fall through */
1192 case WM_IME_STARTCOMPOSITION:
1193 case WM_IME_ENDCOMPOSITION:
1194 case WM_IME_SELECT:
1195 case WM_IME_NOTIFY:
1196 case WM_IME_CONTROL:
1197 case WM_IME_SETCONTEXT:
1198NormalImeMsgHandling:
1199 {
1200 HWND hwndIME;
1201
1202 if (GetWin32ClientInfo()->dwTIFlags & TIF_DISABLEIME)
1203 {
1204 TRACE("This thread's IME is disabled\n");
1205 break;
1206 }
1207
1208 hwndIME = IMM_FN(ImmGetDefaultIMEWnd)(hWnd);
1209 if (!hwndIME)
1210 {
1211 ERR("hwndIME was NULL\n");
1212 break;
1213 }
1214
1215 if (hwndIME == hWnd)
1216 {
1217 ImeWndProc_common(hwndIME, Msg, wParam, lParam, TRUE);
1218 break;
1219 }
1220
1221 Result = SendMessageW(hwndIME, Msg, wParam, lParam);
1222 break;
1223 }
1224
1225 case WM_IME_SYSTEM:
1226 {
1227 if (wParam == 4)
1228 break;
1229
1230 goto NormalImeMsgHandling;
1231 }
1232
1233 default:
1235 }
1237
1238 return Result;
1239}
1240
1243 UINT Msg,
1244 WPARAM wParam,
1245 LPARAM lParam)
1246{
1247 BOOL Hook, msgOverride = FALSE;
1248 LRESULT Result = 0;
1249
1251
1252 Hook = BeginIfHookedUserApiHook();
1253 if (Hook)
1254 {
1255 msgOverride = IsMsgOverride(Msg, &guah.DefWndProcArray);
1256 if(msgOverride == FALSE)
1257 {
1259 }
1260 }
1261
1262 /* Bypass SEH and go direct. */
1263 if (!Hook || !msgOverride)
1265
1266 _SEH2_TRY
1267 {
1269 }
1271 {
1272 ERR("Got exception in hooked DefWindowProcA!\n");
1273 }
1274 _SEH2_END;
1275
1277
1278 return Result;
1279}
1280
1283 UINT Msg,
1284 WPARAM wParam,
1285 LPARAM lParam)
1286{
1287 BOOL Hook, msgOverride = FALSE;
1288 LRESULT Result = 0;
1289
1291
1292 Hook = BeginIfHookedUserApiHook();
1293 if (Hook)
1294 {
1295 msgOverride = IsMsgOverride(Msg, &guah.DefWndProcArray);
1296 if(msgOverride == FALSE)
1297 {
1299 }
1300 }
1301
1302 /* Bypass SEH and go direct. */
1303 if (!Hook || !msgOverride)
1305
1306 _SEH2_TRY
1307 {
1309 }
1311 {
1312 ERR("Got exception in hooked DefWindowProcW!\n");
1313 }
1314 _SEH2_END;
1315
1317
1318 return Result;
1319}
static HDC hDC
Definition: 3dtext.c:33
#define DCX_USESTYLE
Definition: GetDCEx.c:10
#define NUM_SYSCOLORS
Definition: SetSysColors.c:10
#define DECLSPEC_HOTPATCH
Definition: _mingw.h:243
HWND hWnd
Definition: settings.c:17
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
Definition: copy.c:51
#define UlongToHandle(ul)
Definition: basetsd.h:97
#define FIXME(fmt,...)
Definition: debug.h:111
#define WARN(fmt,...)
Definition: debug.h:112
#define ERR(fmt,...)
Definition: debug.h:110
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
struct @1627 Msg[]
LONG WINAPI ImmGetCompositionStringW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen)
Definition: compstr.c:899
LONG WINAPI ImmGetCompositionStringA(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen)
Definition: compstr.c:856
#define DC_ACTIVE
Definition: dc21x4.h:120
#define Len
Definition: deflate.h:82
DWORD HIMC
Definition: dimm.idl:75
#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:32
#define GetProcessHeap()
Definition: compat.h:736
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:109
#define SetLastError(x)
Definition: compat.h:752
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define WideCharToMultiByte
Definition: compat.h:111
HWND WINAPI ImmGetDefaultIMEWnd(HWND hWnd)
Definition: ime.c:890
HIMC WINAPI ImmGetContext(HWND hWnd)
Definition: imm.c:1044
BOOL WINAPI ImmReleaseContext(HWND hWnd, HIMC hIMC)
Definition: imm.c:1085
PSERVERINFO gpsi
Definition: imm.c:18
#define ValidateHwnd(hwnd)
Definition: precomp.h:85
static PVOID FASTCALL DesktopPtrToUser(PVOID ptr)
Definition: utils.c:324
UINT WINAPI DECLSPEC_HOTPATCH WinExec(LPCSTR lpCmdLine, UINT uCmdShow)
Definition: proc.c:4773
BOOL WINAPI IsDBCSLeadByte(BYTE TestByte)
Definition: nls.c:2359
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:94
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
const GLubyte * c
Definition: glext.h:8905
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
UINT NTAPI GlobalFlags(HGLOBAL hMem)
Definition: heapmem.c:520
#define ISITHOOKED(HookId)
Definition: hook.h:6
#define cs
Definition: i386-dis.c:442
#define GCS_RESULTSTR
Definition: imm.h:234
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
VOID NTAPI RtlInitLargeAnsiString(IN OUT PLARGE_ANSI_STRING, IN PCSZ, IN INT)
Definition: rtlstr.c:17
BOOL NTAPI NtUserMessageCall(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, ULONG_PTR ResultInfo, DWORD dwType, BOOL Ansi)
Definition: message.c:2490
HKL NTAPI NtUserActivateKeyboardLayout(HKL hKL, ULONG Flags)
Definition: kbdlayout.c:1263
#define WNDS_ACTIVEFRAME
Definition: ntuser.h:611
#define FNID_DEFWINDOWPROC
Definition: ntuser.h:863
#define UserHMGetHandle(obj)
Definition: ntuser.h:230
BOOL NTAPI NtUserDefSetText(HWND WindowHandle, PLARGE_STRING WindowText)
Definition: window.c:4453
#define TIF_DISABLEIME
Definition: ntuser.h:288
BOOL NTAPI NtUserDrawCaption(HWND hWnd, HDC hDc, LPCRECT lpRc, UINT uFlags)
Definition: painting.c:2450
#define QUERY_WINDOW_FOREGROUND
Definition: ntuser.h:2833
DWORD_PTR NTAPI NtUserQueryWindow(HWND hWnd, DWORD Index)
Definition: window.c:4189
#define SRVINFO_APIHOOK
Definition: ntuser.h:950
VOID NTAPI RtlInitLargeUnicodeString(IN OUT PLARGE_UNICODE_STRING, IN PCWSTR, IN INT)
Definition: rtlstr.c:42
#define GetWin32ClientInfo()
Definition: ntuser.h:352
#define WNDS_HASCAPTION
Definition: ntuser.h:608
BOOL NTAPI NtUserSetSysColors(int cElements, IN CONST INT *lpaElements, IN CONST COLORREF *lpaRgbValues, FLONG Flags)
Definition: ntstubs.c:288
#define LOBYTE(W)
Definition: jmemdos.c:487
#define HIBYTE(W)
Definition: jmemdos.c:486
#define SC_SCREENSAVE
Definition: mmsystem.h:933
static HDC
Definition: imagelist.c:92
static HICON
Definition: imagelist.c:84
static HTREEITEM hRoot
Definition: treeview.c:381
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define WM_KEYF1
Definition: msg.c:47
#define min(a, b)
Definition: monoChain.cc:55
HICON hIcon
Definition: msconfig.c:44
UINT_PTR HKL
Definition: msctf.idl:143
unsigned int UINT
Definition: ndis.h:50
_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:1597
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteSize(_Out_ PULONG MbSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
Definition: nlsboot.c:145
#define FASTCALL
Definition: nt_native.h:50
LRESULT FASTCALL DefWndGetIcon(PWND pWnd, WPARAM wParam, LPARAM lParam)
Definition: defwnd.c:476
LRESULT FASTCALL DefWndHandleSysCommand(PWND pWnd, WPARAM wParam, LPARAM lParam)
Definition: defwnd.c:125
BOOL UserPaintCaption(PWND pWnd, INT Flags)
Definition: defwnd.c:398
HBRUSH FASTCALL DefWndControlColor(HDC hDC, UINT ctlType)
Definition: defwnd.c:32
#define L(x)
Definition: ntvdm.h:50
EXTINLINE BOOL NtUserxUpdateUiState(HWND hWnd, DWORD Param)
Definition: ntwrapper.h:686
#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 CONST
Definition: pedump.c:81
#define WS_EX_ACCEPTFILES
Definition: pedump.c:648
#define WS_POPUP
Definition: pedump.c:616
#define WS_VSCROLL
Definition: pedump.c:627
#define WS_MINIMIZE
Definition: pedump.c:622
#define WS_VISIBLE
Definition: pedump.c:620
long LONG
Definition: pedump.c:60
#define WS_HSCROLL
Definition: pedump.c:628
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:34
LRESULT WINAPI ImeWndProc_common(HWND, UINT, WPARAM, LPARAM, BOOL)
Definition: imm.c:935
#define WM_CONTEXTMENU
Definition: richedit.h:64
#define TRACE(s)
Definition: solgame.cpp:4
root entry for file system trees
Definition: entries.h:148
UINT LastInputWasKbd
Definition: ntuser.h:154
Definition: ntuser.h:694
struct _WND * spwndOwner
Definition: ntuser.h:715
DWORD style
Definition: ntuser.h:706
PSBINFO pSBInfo
Definition: ntuser.h:726
UINT HideFocus
Definition: ntuser.h:758
UINT HideAccel
Definition: ntuser.h:759
LARGE_UNICODE_STRING strName
Definition: ntuser.h:736
DWORD state
Definition: ntuser.h:701
struct _WND * spwndParent
Definition: ntuser.h:713
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
ATOM atomIconProp
Definition: ntuser.h:1066
DWORD dwSRVIFlags
Definition: ntuser.h:1051
ATOM atomIconSmProp
Definition: ntuser.h:1065
UAHOWP DefWndProcArray
Definition: undocuser.h:341
WNDPROC DefWindowProcA
Definition: undocuser.h:339
WNDPROC DefWindowProcW
Definition: undocuser.h:340
#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
char * PSTR
Definition: typedefs.h:51
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define MAKEWORD(a, b)
Definition: typedefs.h:248
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
CONST char * PCSZ
Definition: umtypes.h:125
#define WM_COPYGLOBALDATA
Definition: undocuser.h:36
#define TPM_SYSTEM_MENU
Definition: undocuser.h:73
#define WM_NCUAHDRAWCAPTION
Definition: undocuser.h:46
#define WM_QUERYDROPOBJECT
Definition: undocuser.h:55
#define DC_DRAWCAPTIONMD
Definition: undocuser.h:151
#define WM_ISACTIVEICON
Definition: undocuser.h:33
#define WM_CLIENTSHUTDOWN
Definition: undocuser.h:35
#define WM_POPUPSYSTEMMENU
Definition: undocuser.h:61
#define WM_IME_SYSTEM
Definition: undocuser.h:60
#define WC_DIALOG
Definition: undocuser.h:11
#define WM_NCUAHDRAWFRAME
Definition: undocuser.h:47
VOID FASTCALL ScrollTrackScrollBar(HWND Wnd, INT SBType, POINT Pt)
Definition: scrollbar.c:1155
LRESULT WINAPI DoAppSwitch(WPARAM wParam, LPARAM lParam)
Definition: appswitch.c:584
BOOL WINAPI SetSysColors(int cElements, CONST INT *lpaElements, CONST COLORREF *lpaRgbValues)
Definition: defwnd.c:55
LRESULT WINAPI User32DefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL bUnicode)
Definition: defwnd.c:317
LRESULT WINAPI RealDefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: defwnd.c:818
LRESULT WINAPI DefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: defwnd.c:1242
HWND FASTCALL IntFindChildWindowToOwner(HWND hRoot, HWND hOwner)
Definition: defwnd.c:83
LRESULT WINAPI RealDefWindowProcW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: defwnd.c:1042
DWORD WINAPI DECLSPEC_HOTPATCH GetSysColor(int nIndex)
Definition: defwnd.c:23
static BOOL CALLBACK UserSendUiUpdateMsg(HWND hwnd, LPARAM lParam)
Definition: defwnd.c:249
static VOID DefWndTrackScrollBar(HWND Wnd, WPARAM wParam, POINT Pt)
Definition: defwnd.c:118
HBRUSH WINAPI DECLSPEC_HOTPATCH GetSysColorBrush(int nIndex)
Definition: defwnd.c:40
LRESULT WINAPI DefWindowProcW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: defwnd.c:1282
void SPY_EnterMessage(INT iFlag, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: spy.c:2593
HWND * WIN_ListChildren(HWND hWndparent)
Definition: mdi.c:139
BOOL FASTCALL EndUserApiHook(VOID)
Definition: usrapihk.c:164
BOOL FASTCALL BeginIfHookedUserApiHook(VOID)
Definition: usrapihk.c:106
BOOL FASTCALL IsMsgOverride(UINT, PUAHOWP)
Definition: usrapihk.c:63
#define IMM_FN(name)
Definition: user32p.h:56
USERAPIHOOK guah
Definition: usrapihk.c:344
#define SPY_RESULT_DEFWND
Definition: user32p.h:72
void SPY_ExitMessage(INT iFlag, HWND hwnd, UINT msg, LRESULT lReturn, WPARAM wParam, LPARAM lParam)
Definition: spy.c:2648
#define SPY_DEFWNDPROC
Definition: user32p.h:69
static __inline void LoadUserApiHook()
Definition: user_x.h:85
static __inline PDESKTOPINFO GetThreadDesktopInfo(VOID)
Definition: user_x.h:43
BOOL APIENTRY DefSetText(PWND Wnd, PCWSTR WindowText)
Definition: window.c:4372
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFDEVICE Child
Definition: wdffdo.h:536
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510
VOID FASTCALL IntNotifyWinEvent(DWORD Event, PWND pWnd, LONG idObject, LONG idChild, DWORD flags)
Definition: event.c:178
HANDLE FASTCALL UserGetProp(_In_ PWND Window, _In_ ATOM Atom, _In_ BOOLEAN SystemProp)
Definition: prop.c:46
#define OBJID_WINDOW
Definition: winable.h:15
#define CHILDID_SELF
Definition: winable.h:14
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
DWORD COLORREF
Definition: windef.h:300
#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
BOOL WINAPI UnrealizeObject(_In_ HGDIOBJ)
int WINAPI GetClipBox(_In_ HDC, _Out_ LPRECT)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:999
BOOL WINAPI DPtoLP(_In_ HDC hdc, _Inout_updates_(c) LPPOINT lppt, _In_ int c)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:918
#define SW_SHOWNORMAL
Definition: winuser.h:770
#define WM_PAINT
Definition: winuser.h:1620
HWND WINAPI GetFocus(void)
Definition: window.c:1893
#define SC_HSCROLL
Definition: winuser.h:2594
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_ERASEBKGND
Definition: winuser.h:1625
#define SC_MOUSEMENU
Definition: winuser.h:2595
#define WM_GETHOTKEY
Definition: winuser.h:1653
#define MAKEWPARAM(l, h)
Definition: winuser.h:4009
#define WM_IME_KEYUP
Definition: winuser.h:1839
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1772
#define WM_GETTEXTLENGTH
Definition: winuser.h:1619
#define CTLCOLOR_SCROLLBAR
Definition: winuser.h:956
#define WM_CLOSE
Definition: winuser.h:1621
#define WM_SYSCOMMAND
Definition: winuser.h:1741
#define GetWindowLongPtrW
Definition: winuser.h:4829
#define SC_KEYMENU
Definition: winuser.h:2596
#define MAKELPARAM(l, h)
Definition: winuser.h:4008
#define KLF_SETFORPROCESS
Definition: winuser.h:117
#define WM_KEYUP
Definition: winuser.h:1716
#define COLOR_WINDOW
Definition: winuser.h:918
#define COLOR_SCROLLBAR
Definition: winuser.h:912
#define WM_CHARTOITEM
Definition: winuser.h:1649
#define HTCAPTION
Definition: winuser.h:2476
#define DCX_WINDOW
Definition: winuser.h:2113
#define WM_IME_NOTIFY
Definition: winuser.h:1830
#define WM_QUERYOPEN
Definition: winuser.h:1624
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_SETHOTKEY
Definition: winuser.h:1652
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1661
#define COLOR_WINDOWTEXT
Definition: winuser.h:921
#define TPM_RIGHTBUTTON
Definition: winuser.h:2380
#define WM_IME_KEYDOWN
Definition: winuser.h:1838
#define WM_SYNCPAINT
Definition: winuser.h:1690
#define CTLCOLOR_LISTBOX
Definition: winuser.h:953
#define SC_PREVWINDOW
Definition: winuser.h:2591
#define SB_VERT
Definition: winuser.h:553
#define WM_CANCELMODE
Definition: winuser.h:1635
#define SC_VSCROLL
Definition: winuser.h:2593
#define WM_LBUTTONDBLCLK
Definition: winuser.h:1778
struct tagCREATESTRUCTA * LPCREATESTRUCTA
#define HTVSCROLL
Definition: winuser.h:2482
#define MA_ACTIVATE
Definition: winuser.h:2501
BOOL WINAPI SetForegroundWindow(_In_ HWND)
#define HTHSCROLL
Definition: winuser.h:2481
#define WM_APPCOMMAND
Definition: winuser.h:1882
#define HKL_PREV
Definition: winuser.h:110
#define WM_NCHITTEST
Definition: winuser.h:1686
#define WM_RBUTTONUP
Definition: winuser.h:1780
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_GETTEXT
Definition: winuser.h:1618
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
#define SC_TASKLIST
Definition: winuser.h:2599
#define CTLCOLOR_EDIT
Definition: winuser.h:952
#define WM_CTLCOLORSCROLLBAR
Definition: winuser.h:1771
#define WA_INACTIVE
Definition: winuser.h:2622
#define MA_NOACTIVATE
Definition: winuser.h:2503
HMENU WINAPI GetSystemMenu(_In_ HWND, _In_ BOOL)
#define WM_LBUTTONDOWN
Definition: winuser.h:1776
#define WM_DEVICECHANGE
Definition: winuser.h:1811
#define WH_CBT
Definition: winuser.h:35
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1626
BOOL WINAPI EnumChildWindows(_In_opt_ HWND, _In_ WNDENUMPROC, _In_ LPARAM)
#define WM_QUERYDRAGICON
Definition: winuser.h:1654
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
#define WM_CTLCOLORMSGBOX
Definition: winuser.h:1766
#define WM_NCLBUTTONDBLCLK
Definition: winuser.h:1694
#define WM_NCCREATE
Definition: winuser.h:1683
#define IDI_APPLICATION
Definition: winuser.h:704
#define SC_SIZE
Definition: winuser.h:2584
#define WM_ACTIVATE
Definition: winuser.h:1612
#define WM_SHOWWINDOW
Definition: winuser.h:1628
#define WM_IME_SETCONTEXT
Definition: winuser.h:1829
#define WM_RBUTTONDOWN
Definition: winuser.h:1779
#define SC_MINIMIZE
Definition: winuser.h:2586
#define WM_CTLCOLORBTN
Definition: winuser.h:1769
#define WM_SETTEXT
Definition: winuser.h:1617
BOOL WINAPI IsWindowUnicode(_In_ HWND)
#define SC_NEXTWINDOW
Definition: winuser.h:2590
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WM_NCACTIVATE
Definition: winuser.h:1688
#define WM_IME_CHAR
Definition: winuser.h:1834
#define WM_SYSCHAR
Definition: winuser.h:1721
#define HKL_NEXT
Definition: winuser.h:109
HWND WINAPI SetFocus(_In_opt_ HWND)
#define WM_QUERYENDSESSION
Definition: winuser.h:1622
#define SIF_ALL
Definition: winuser.h:1232
#define WM_SYSKEYUP
Definition: winuser.h:1720
#define SC_HOTKEY
Definition: winuser.h:2601
#define GCL_HBRBACKGROUND
Definition: winuser.h:664
#define SC_CLOSE
Definition: winuser.h:2592
#define DC_TEXT
Definition: winuser.h:430
#define SC_MOVE
Definition: winuser.h:2585
#define WM_MOUSEACTIVATE
Definition: winuser.h:1637
#define TPM_LEFTBUTTON
Definition: winuser.h:2379
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
#define WM_CHAR
Definition: winuser.h:1717
BOOL WINAPI IsWindowEnabled(_In_ HWND)
HWND WINAPI GetParent(_In_ HWND)
#define GetClassLongPtrW
Definition: winuser.h:4564
#define NFR_ANSI
Definition: winuser.h:2458
#define COLOR_3DHILIGHT
Definition: winuser.h:937
#define WM_SETCURSOR
Definition: winuser.h:1636
#define WM_IME_CONTROL
Definition: winuser.h:1831
#define WM_CTLCOLORLISTBOX
Definition: winuser.h:1768
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
#define WM_IME_SELECT
Definition: winuser.h:1833
#define WM_NCRBUTTONUP
Definition: winuser.h:1696
#define WM_KEYDOWN
Definition: winuser.h:1715
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define WM_ICONERASEBKGND
Definition: winuser.h:1642
#define WM_PRINT
Definition: winuser.h:1880
#define NFR_UNICODE
Definition: winuser.h:2459
#define GCL_HICON
Definition: winuser.h:666
#define WM_NCCALCSIZE
Definition: winuser.h:1685
#define GWL_STYLE
Definition: winuser.h:852
#define CS_PARENTDC
Definition: winuser.h:656
#define WM_CTLCOLOREDIT
Definition: winuser.h:1767
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1662
#define SC_RESTORE
Definition: winuser.h:2598
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CTLCOLORDLG
Definition: winuser.h:1770
struct tagCREATESTRUCTW * LPCREATESTRUCTW
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2075
#define WM_SYSKEYDOWN
Definition: winuser.h:1719
#define WM_NCLBUTTONDOWN
Definition: winuser.h:1692
#define GCW_ATOM
Definition: winuser.h:661
#define GCL_STYLE
Definition: winuser.h:670
#define WM_PAINTICON
Definition: winuser.h:1641
#define NF_QUERY
Definition: winuser.h:2460
#define WM_MBUTTONDOWN
Definition: winuser.h:1782
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SC_MAXIMIZE
Definition: winuser.h:2588
#define SB_HORZ
Definition: winuser.h:552
#define WM_NCPAINT
Definition: winuser.h:1687
#define WM_VKEYTOITEM
Definition: winuser.h:1648
#define WM_NCRBUTTONDOWN
Definition: winuser.h:1695
#define GWL_EXSTYLE
Definition: winuser.h:851
#define COLOR_3DFACE
Definition: winuser.h:929
#define WM_SETREDRAW
Definition: winuser.h:1616
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
__wchar_t WCHAR
Definition: xmlstorage.h:180