ReactOS 0.4.16-dev-976-g18fc5a1
window.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS user32.dll
4 * FILE: win32ss/user/user32/windows/window.c
5 * PURPOSE: Window management
6 * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
7 * Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
8 * UPDATE HISTORY:
9 * 06-06-2001 CSH Created
10 */
11
12#define DEBUG
13#include <user32.h>
14
16
17void MDI_CalcDefaultChildPos( HWND hwndClient, INT total, LPPOINT lpPos, INT delta, UINT *id );
18extern LPCWSTR FASTCALL ClassNameToVersion(const void *lpszClass, LPCWSTR lpszMenuName, LPCWSTR *plpLibFileName, HANDLE *pContext, BOOL bAnsi);
19
20/* FUNCTIONS *****************************************************************/
21
22
25{
27
28 TRACE("User32CallSendAsyncProcKernel()\n");
29
30 CallbackArgs = (PSENDASYNCPROC_CALLBACK_ARGUMENTS)Arguments;
31
32 if (ArgumentLength != sizeof(SENDASYNCPROC_CALLBACK_ARGUMENTS))
33 {
35 }
36
37 CallbackArgs->Callback(CallbackArgs->Wnd,
38 CallbackArgs->Msg,
39 CallbackArgs->Context,
40 CallbackArgs->Result);
41 return(STATUS_SUCCESS);
42}
43
44
45/*
46 * @implemented
47 */
50{
51 return NtUserxAllowSetForegroundWindow(dwProcessId);
52}
53
54
55/*
56 * @unimplemented
57 */
58HDWP WINAPI
59BeginDeferWindowPos(int nNumWindows)
60{
61 return NtUserxBeginDeferWindowPos(nNumWindows);
62}
63
64
65/*
66 * @implemented
67 */
70{
73 0,
74 0,
75 0,
76 0,
78}
79
80
83{
85}
86
87
88/*
89 * @implemented
90 */
94{
96}
97
98
99/*
100 * @implemented
101 */
104 POINT pt,
105 UINT uFlags)
106{
108}
109
110
111/*
112 * @implemented
113 */
116{
117 /* NOTE: CloseWindow does minimizes, and doesn't close. */
120}
121
123VOID
125 OUT PLARGE_STRING plstr,
126 LPCVOID psz,
127 BOOL bUnicode)
128{
129 if(bUnicode)
130 {
132 }
133 else
134 {
136 }
137}
138
139VOID
140NTAPI
142 IN PLARGE_STRING LargeString)
143{
144 if (LargeString->Buffer)
145 {
146 RtlFreeHeap(GetProcessHeap(), 0, LargeString->Buffer);
147 RtlZeroMemory(LargeString, sizeof(LARGE_STRING));
148 }
149}
150
153 LPCSTR lpClassName,
154 LPCSTR lpWindowName,
155 DWORD dwStyle,
156 int x,
157 int y,
158 int nWidth,
159 int nHeight,
161 HMENU hMenu,
163 LPVOID lpParam,
165{
166 LARGE_STRING WindowName;
167 LARGE_STRING lstrClassName, *plstrClassName;
168 LARGE_STRING lstrClassVersion, *plstrClassVersion;
169 UNICODE_STRING ClassName;
170 UNICODE_STRING ClassVersion;
171 WNDCLASSEXA wceA;
172 WNDCLASSEXW wceW;
174 DWORD dwLastError;
175 BOOL Unicode, ClassFound = FALSE;
176 HWND Handle = NULL;
177 LPCWSTR lpszClsVersion;
178 LPCWSTR lpLibFileName = NULL;
179 HANDLE pCtx = NULL;
180 DWORD dwFlagsVer;
181
182#if 0
183 DbgPrint("[window] User32CreateWindowEx style %d, exstyle %d, parent %d\n", dwStyle, dwExStyle, hWndParent);
184#endif
185
187 TRACE("Module Version %x\n",dwFlagsVer);
188
190 {
191 TRACE("RegisterSystemControls\n");
193 }
194
195 Unicode = !(dwFlags & NUCWE_ANSI);
196
197 if (IS_ATOM(lpClassName))
198 {
199 plstrClassName = (PVOID)lpClassName;
200 }
201 else
202 {
203 if (Unicode)
204 {
205 RtlInitUnicodeString(&ClassName, (PCWSTR)lpClassName);
206 }
207 else
208 {
209 if (!RtlCreateUnicodeStringFromAsciiz(&ClassName, (PCSZ)lpClassName))
210 {
212 return NULL;
213 }
214 }
215
216 /* Copy it to a LARGE_STRING */
217 lstrClassName.Buffer = ClassName.Buffer;
218 lstrClassName.Length = ClassName.Length;
219 lstrClassName.MaximumLength = ClassName.MaximumLength;
220 plstrClassName = &lstrClassName;
221 }
222
223 /* Initialize a LARGE_STRING */
224 RtlInitLargeString(&WindowName, lpWindowName, Unicode);
225
226 // HACK: The current implementation expects the Window name to be UNICODE
227 if (!Unicode)
228 {
230 PSTR AnsiBuffer = WindowName.Buffer;
231 ULONG AnsiLength = WindowName.Length;
232
233 WindowName.Length = 0;
234 WindowName.MaximumLength = AnsiLength * sizeof(WCHAR);
235 WindowName.Buffer = RtlAllocateHeap(RtlGetProcessHeap(),
236 0,
237 WindowName.MaximumLength);
238 if (!WindowName.Buffer)
239 {
241 goto cleanup;
242 }
243
245 WindowName.MaximumLength,
246 &WindowName.Length,
248 AnsiLength);
249 if (!NT_SUCCESS(Status))
250 {
251 goto cleanup;
252 }
253 }
254
255 if (!hMenu && (dwStyle & (WS_OVERLAPPEDWINDOW | WS_POPUP)))
256 {
257 if (Unicode)
258 {
259 wceW.cbSize = sizeof(wceW);
260 if (GetClassInfoExW(hInstance, (LPCWSTR)lpClassName, &wceW) && wceW.lpszMenuName)
261 {
262 hMenu = LoadMenuW(hInstance, wceW.lpszMenuName);
263 }
264 }
265 else
266 {
267 wceA.cbSize = sizeof(wceA);
268 if (GetClassInfoExA(hInstance, lpClassName, &wceA) && wceA.lpszMenuName)
269 {
270 hMenu = LoadMenuA(hInstance, wceA.lpszMenuName);
271 }
272 }
273 }
274
275 if (!Unicode) dwExStyle |= WS_EX_SETANSICREATOR;
276
277 lpszClsVersion = ClassNameToVersion(lpClassName, NULL, &lpLibFileName, &pCtx, !Unicode);
278 if (!lpszClsVersion)
279 {
280 plstrClassVersion = plstrClassName;
281 }
282 else
283 {
284 RtlInitUnicodeString(&ClassVersion, lpszClsVersion);
285 lstrClassVersion.Buffer = ClassVersion.Buffer;
286 lstrClassVersion.Length = ClassVersion.Length;
287 lstrClassVersion.MaximumLength = ClassVersion.MaximumLength;
288 plstrClassVersion = &lstrClassVersion;
289 }
290
291 for (;;)
292 {
293 Handle = NtUserCreateWindowEx(dwExStyle,
294 plstrClassName,
295 plstrClassVersion,
296 &WindowName,
297 dwStyle,
298 x,
299 y,
300 nWidth,
301 nHeight,
303 hMenu,
304 hInstance,
305 lpParam,
306 dwFlagsVer,
307 pCtx );
308 if (Handle) break;
309 if (!lpLibFileName) break;
310 if (!ClassFound)
311 {
312 dwLastError = GetLastError();
313 if (dwLastError == ERROR_CANNOT_FIND_WND_CLASS)
314 {
315 ClassFound = VersionRegisterClass(ClassName.Buffer, lpLibFileName, pCtx, &hLibModule);
316 if (ClassFound) continue;
317 }
318 }
319 if (hLibModule)
320 {
321 dwLastError = GetLastError();
323 SetLastError(dwLastError);
325 }
326 break;
327 }
328
329#if 0
330 DbgPrint("[window] NtUserCreateWindowEx() == %d\n", Handle);
331#endif
332
333cleanup:
334 if (!Unicode)
335 {
336 if (!IS_ATOM(lpClassName))
337 RtlFreeUnicodeString(&ClassName);
338
339 RtlFreeLargeString(&WindowName);
340 }
341
342 return Handle;
343}
344
345
346/*
347 * @implemented
348 */
349HWND
350WINAPI
353 LPCSTR lpClassName,
354 LPCSTR lpWindowName,
355 DWORD dwStyle,
356 int x,
357 int y,
358 int nWidth,
359 int nHeight,
361 HMENU hMenu,
363 LPVOID lpParam)
364{
366 HWND hwnd;
367
369 {
370 TRACE("CreateWindowExA RegisterSystemControls\n");
372 }
373
374 if (dwExStyle & WS_EX_MDICHILD)
375 {
376 POINT mPos[2];
377 UINT id = 0;
378 HWND top_child;
379 PWND pWndParent;
380
381 pWndParent = ValidateHwnd(hWndParent);
382
383 if (!pWndParent) return NULL;
384
385 if (pWndParent->fnid != FNID_MDICLIENT) // wine uses WIN_ISMDICLIENT
386 {
387 WARN("WS_EX_MDICHILD, but parent %p is not MDIClient\n", hWndParent);
388 goto skip_mdi;
389 }
390
391 /* lpParams of WM_[NC]CREATE is different for MDI children.
392 * MDICREATESTRUCT members have the originally passed values.
393 */
394 mdi.szClass = lpClassName;
395 mdi.szTitle = lpWindowName;
396 mdi.hOwner = hInstance;
397 mdi.x = x;
398 mdi.y = y;
399 mdi.cx = nWidth;
400 mdi.cy = nHeight;
401 mdi.style = dwStyle;
402 mdi.lParam = (LPARAM)lpParam;
403
404 lpParam = (LPVOID)&mdi;
405
406 if (pWndParent->style & MDIS_ALLCHILDSTYLES)
407 {
408 if (dwStyle & WS_POPUP)
409 {
410 WARN("WS_POPUP with MDIS_ALLCHILDSTYLES is not allowed\n");
411 return(0);
412 }
413 dwStyle |= (WS_CHILD | WS_CLIPSIBLINGS);
414 }
415 else
416 {
417 dwStyle &= ~WS_POPUP;
420 }
421
422 top_child = GetWindow(hWndParent, GW_CHILD);
423
424 if (top_child)
425 {
426 /* Restore current maximized child */
427 if((dwStyle & WS_VISIBLE) && IsZoomed(top_child))
428 {
429 TRACE("Restoring current maximized child %p\n", top_child);
430 SendMessageW( top_child, WM_SETREDRAW, FALSE, 0 );
431 ShowWindow(top_child, SW_RESTORE);
432 SendMessageW( top_child, WM_SETREDRAW, TRUE, 0 );
433 }
434 }
435
436 MDI_CalcDefaultChildPos(hWndParent, -1, mPos, 0, &id);
437
438 if (!(dwStyle & WS_POPUP)) hMenu = UlongToHandle(id);
439
440 if (dwStyle & (WS_CHILD | WS_POPUP))
441 {
442 if (x == CW_USEDEFAULT || x == CW_USEDEFAULT16)
443 {
444 x = mPos[0].x;
445 y = mPos[0].y;
446 }
447 if (nWidth == CW_USEDEFAULT || nWidth == CW_USEDEFAULT16 || !nWidth)
448 nWidth = mPos[1].x;
449 if (nHeight == CW_USEDEFAULT || nHeight == CW_USEDEFAULT16 || !nHeight)
450 nHeight = mPos[1].y;
451 }
452 }
453
454skip_mdi:
455 hwnd = User32CreateWindowEx(dwExStyle,
456 lpClassName,
457 lpWindowName,
458 dwStyle,
459 x,
460 y,
461 nWidth,
462 nHeight,
464 hMenu,
465 hInstance,
466 lpParam,
467 NUCWE_ANSI);
468 return hwnd;
469}
470
471
472/*
473 * @implemented
474 */
475HWND
476WINAPI
479 LPCWSTR lpClassName,
480 LPCWSTR lpWindowName,
481 DWORD dwStyle,
482 int x,
483 int y,
484 int nWidth,
485 int nHeight,
487 HMENU hMenu,
489 LPVOID lpParam)
490{
492 HWND hwnd;
493
495 {
496 ERR("CreateWindowExW RegisterSystemControls\n");
498 }
499
500 if (dwExStyle & WS_EX_MDICHILD)
501 {
502 POINT mPos[2];
503 UINT id = 0;
504 HWND top_child;
505 PWND pWndParent;
506
507 pWndParent = ValidateHwnd(hWndParent);
508
509 if (!pWndParent) return NULL;
510
511 if (pWndParent->fnid != FNID_MDICLIENT)
512 {
513 WARN("WS_EX_MDICHILD, but parent %p is not MDIClient\n", hWndParent);
514 goto skip_mdi;
515 }
516
517 /* lpParams of WM_[NC]CREATE is different for MDI children.
518 * MDICREATESTRUCT members have the originally passed values.
519 */
520 mdi.szClass = lpClassName;
521 mdi.szTitle = lpWindowName;
522 mdi.hOwner = hInstance;
523 mdi.x = x;
524 mdi.y = y;
525 mdi.cx = nWidth;
526 mdi.cy = nHeight;
527 mdi.style = dwStyle;
528 mdi.lParam = (LPARAM)lpParam;
529
530 lpParam = (LPVOID)&mdi;
531
532 if (pWndParent->style & MDIS_ALLCHILDSTYLES)
533 {
534 if (dwStyle & WS_POPUP)
535 {
536 WARN("WS_POPUP with MDIS_ALLCHILDSTYLES is not allowed\n");
537 return(0);
538 }
539 dwStyle |= (WS_CHILD | WS_CLIPSIBLINGS);
540 }
541 else
542 {
543 dwStyle &= ~WS_POPUP;
546 }
547
548 top_child = GetWindow(hWndParent, GW_CHILD);
549
550 if (top_child)
551 {
552 /* Restore current maximized child */
553 if((dwStyle & WS_VISIBLE) && IsZoomed(top_child))
554 {
555 TRACE("Restoring current maximized child %p\n", top_child);
556 SendMessageW( top_child, WM_SETREDRAW, FALSE, 0 );
557 ShowWindow(top_child, SW_RESTORE);
558 SendMessageW( top_child, WM_SETREDRAW, TRUE, 0 );
559 }
560 }
561
562 MDI_CalcDefaultChildPos(hWndParent, -1, mPos, 0, &id);
563
564 if (!(dwStyle & WS_POPUP)) hMenu = UlongToHandle(id);
565
566 if (dwStyle & (WS_CHILD | WS_POPUP))
567 {
568 if (x == CW_USEDEFAULT || x == CW_USEDEFAULT16)
569 {
570 x = mPos[0].x;
571 y = mPos[0].y;
572 }
573 if (nWidth == CW_USEDEFAULT || nWidth == CW_USEDEFAULT16 || !nWidth)
574 nWidth = mPos[1].x;
575 if (nHeight == CW_USEDEFAULT || nHeight == CW_USEDEFAULT16 || !nHeight)
576 nHeight = mPos[1].y;
577 }
578 }
579
580skip_mdi:
581 hwnd = User32CreateWindowEx(dwExStyle,
582 (LPCSTR)lpClassName,
583 (LPCSTR)lpWindowName,
584 dwStyle,
585 x,
586 y,
587 nWidth,
588 nHeight,
590 hMenu,
591 hInstance,
592 lpParam,
593 0);
594 return hwnd;
595}
596
597/*
598 * @unimplemented
599 */
600HDWP WINAPI
601DeferWindowPos(HDWP hWinPosInfo,
602 HWND hWnd,
603 HWND hWndInsertAfter,
604 int x,
605 int y,
606 int cx,
607 int cy,
608 UINT uFlags)
609{
610 return NtUserDeferWindowPos(hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags);
611}
612
613
614/*
615 * @unimplemented
616 */
618EndDeferWindowPos(HDWP hWinPosInfo)
619{
620 return NtUserEndDeferWindowPosEx(hWinPosInfo, FALSE);
621}
622
623
624/*
625 * @implemented
626 */
629{
630 PWND Wnd;
631 HWND Ret = NULL;
632
634 {
635 Wnd = GetThreadDesktopWnd();
636 if (Wnd != NULL)
637 Ret = UserHMGetHandle(Wnd);
638 }
640 {
641 /* Do nothing */
642 }
643 _SEH2_END;
644
645 return Ret;
646}
647
648
649static BOOL
650User32EnumWindows(HDESK hDesktop,
651 HWND hWndparent,
652 WNDENUMPROC lpfn,
655 BOOL bChildren)
656{
657 DWORD i, dwCount = 0;
658 HWND* pHwnd = NULL;
659 HANDLE hHeap;
661
662 if (!lpfn)
663 {
665 return FALSE;
666 }
667
668 /* FIXME instead of always making two calls, should we use some
669 sort of persistent buffer and only grow it ( requiring a 2nd
670 call ) when the buffer wasn't already big enough? */
671 /* first get how many window entries there are */
672 Status = NtUserBuildHwndList(hDesktop,
673 hWndparent,
674 bChildren,
676 dwCount,
677 NULL,
678 &dwCount);
679 if (!NT_SUCCESS(Status))
680 return FALSE;
681
682 if (!dwCount)
683 {
684 if (!dwThreadId)
685 return FALSE;
686 else
687 return TRUE;
688 }
689
690 /* allocate buffer to receive HWND handles */
691 hHeap = GetProcessHeap();
692 pHwnd = HeapAlloc(hHeap, 0, sizeof(HWND)*(dwCount+1));
693 if (!pHwnd)
694 {
696 return FALSE;
697 }
698
699 /* now call kernel again to fill the buffer this time */
700 Status = NtUserBuildHwndList(hDesktop,
701 hWndparent,
702 bChildren,
704 dwCount,
705 pHwnd,
706 &dwCount);
707 if (!NT_SUCCESS(Status))
708 {
709 if (pHwnd)
710 HeapFree(hHeap, 0, pHwnd);
711 return FALSE;
712 }
713
714 /* call the user's callback function until we're done or
715 they tell us to quit */
716 for ( i = 0; i < dwCount; i++ )
717 {
718 /* FIXME I'm only getting NULLs from Thread Enumeration, and it's
719 * probably because I'm not doing it right in NtUserBuildHwndList.
720 * Once that's fixed, we shouldn't have to check for a NULL HWND
721 * here
722 * This is now fixed in revision 50205. (jt)
723 */
724 if (!pHwnd[i]) /* don't enumerate a NULL HWND */
725 continue;
726 if (!(*lpfn)(pHwnd[i], lParam))
727 {
728 HeapFree ( hHeap, 0, pHwnd );
729 return FALSE;
730 }
731 }
732 if (pHwnd)
733 HeapFree(hHeap, 0, pHwnd);
734 return TRUE;
735}
736
737
738/*
739 * @implemented
740 */
743 WNDENUMPROC lpEnumFunc,
745{
746 if (!hWndParent)
747 {
748 return EnumWindows(lpEnumFunc, lParam);
749 }
750 return User32EnumWindows(NULL, hWndParent, lpEnumFunc, lParam, 0, TRUE);
751}
752
753
754/*
755 * @implemented
756 */
759 WNDENUMPROC lpfn,
761{
762 if (!dwThreadId)
765}
766
767
768/*
769 * @implemented
770 */
774{
775 return User32EnumWindows(NULL, NULL, lpEnumFunc, lParam, 0, FALSE);
776}
777
778
779/*
780 * @implemented
781 */
783EnumDesktopWindows(HDESK hDesktop,
784 WNDENUMPROC lpfn,
786{
787 return User32EnumWindows(hDesktop, NULL, lpfn, lParam, 0, FALSE);
788}
789
790
791/*
792 * @implemented
793 */
796 HWND hwndChildAfter,
797 LPCSTR lpszClass,
798 LPCSTR lpszWindow)
799{
801 HWND hwnd = 0;
802
803 if (lpszWindow)
804 {
805 DWORD len = MultiByteToWideChar( CP_ACP, 0, lpszWindow, -1, NULL, 0 );
806 if (!(titleW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return 0;
807 MultiByteToWideChar( CP_ACP, 0, lpszWindow, -1, titleW, len );
808 }
809
810 if (!IS_INTRESOURCE(lpszClass))
811 {
812 WCHAR classW[256];
813 if (MultiByteToWideChar( CP_ACP, 0, lpszClass, -1, classW, sizeof(classW)/sizeof(WCHAR) ))
814 hwnd = FindWindowExW( hwndParent, hwndChildAfter, classW, titleW );
815 }
816 else
817 {
818 hwnd = FindWindowExW( hwndParent, hwndChildAfter, (LPCWSTR)lpszClass, titleW );
819 }
820
822 return hwnd;
823}
824
825
826/*
827 * @implemented
828 */
831 HWND hwndChildAfter,
832 LPCWSTR lpszClass,
833 LPCWSTR lpszWindow)
834{
835 UNICODE_STRING ucClassName, *pucClassName = NULL;
836 UNICODE_STRING ucWindowName, *pucWindowName = NULL;
837
838 if (IS_ATOM(lpszClass))
839 {
840 ucClassName.Length = 0;
841 ucClassName.Buffer = (LPWSTR)lpszClass;
842 pucClassName = &ucClassName;
843 }
844 else if (lpszClass != NULL)
845 {
846 RtlInitUnicodeString(&ucClassName,
847 lpszClass);
848 pucClassName = &ucClassName;
849 }
850
851 if (lpszWindow != NULL)
852 {
853 RtlInitUnicodeString(&ucWindowName,
854 lpszWindow);
855 pucWindowName = &ucWindowName;
856 }
857
859 hwndChildAfter,
860 pucClassName,
861 pucWindowName,
862 0);
863}
864
865
866/*
867 * @implemented
868 */
870FindWindowA(LPCSTR lpClassName, LPCSTR lpWindowName)
871{
872 //FIXME: FindWindow does not search children, but FindWindowEx does.
873 // what should we do about this?
874 return FindWindowExA (NULL, NULL, lpClassName, lpWindowName);
875}
876
877
878/*
879 * @implemented
880 */
882FindWindowW(LPCWSTR lpClassName, LPCWSTR lpWindowName)
883{
884 /*
885
886 There was a FIXME here earlier, but I think it is just a documentation unclarity.
887
888 FindWindow only searches top level windows. What they mean is that child
889 windows of other windows than the desktop can be searched.
890 FindWindowExW never does a recursive search.
891
892 / Joakim
893 */
894
895 return FindWindowExW(NULL, NULL, lpClassName, lpWindowName);
896}
897
898
899
900/*
901 * @implemented
902 */
905 int iItem,
906 PALTTABINFO pati,
907 LPSTR pszItemText,
908 UINT cchItemText)
909{
910 return NtUserGetAltTabInfo(hwnd,iItem,pati,(LPWSTR)pszItemText,cchItemText,TRUE);
911}
912
913
914/*
915 * @implemented
916 */
919 int iItem,
920 PALTTABINFO pati,
921 LPWSTR pszItemText,
922 UINT cchItemText)
923{
924 return NtUserGetAltTabInfo(hwnd,iItem,pati,pszItemText,cchItemText,FALSE);
925}
926
927
928/*
929 * @implemented
930 */
933{
934 HWND Ret = NULL;
935 PWND Ancestor, Wnd;
936
937 Wnd = ValidateHwnd(hwnd);
938 if (!Wnd)
939 return NULL;
940
942 {
943 Ancestor = NULL;
944 switch (gaFlags)
945 {
946 case GA_PARENT:
947 if (Wnd->spwndParent != NULL)
948 Ancestor = DesktopPtrToUser(Wnd->spwndParent);
949 break;
950
951 default:
952 /* FIXME: Call win32k for now */
953 Wnd = NULL;
954 break;
955 }
956
957 if (Ancestor != NULL)
958 Ret = UserHMGetHandle(Ancestor);
959 }
961 {
962 /* Do nothing */
963 }
964 _SEH2_END;
965
966 if (!Wnd) /* Fall back */
967 Ret = NtUserGetAncestor(hwnd, gaFlags);
968
969 return Ret;
970}
971
972
973/*
974 * @implemented
975 */
978{
979 PWND Wnd = ValidateHwnd(hWnd);
980
981 if (!Wnd) return FALSE;
982 if (Wnd->style & WS_MINIMIZED)
983 {
984 lpRect->left = lpRect->top = 0;
987 return TRUE;
988 }
989 if ( hWnd != GetDesktopWindow()) // Wnd->fnid != FNID_DESKTOP )
990 {
991/* lpRect->left = lpRect->top = 0;
992 lpRect->right = Wnd->rcClient.right - Wnd->rcClient.left;
993 lpRect->bottom = Wnd->rcClient.bottom - Wnd->rcClient.top;
994*/
995 *lpRect = Wnd->rcClient;
996 OffsetRect(lpRect, -Wnd->rcClient.left, -Wnd->rcClient.top);
997 }
998 else
999 {
1000 lpRect->left = lpRect->top = 0;
1001 lpRect->right = Wnd->rcClient.right;
1002 lpRect->bottom = Wnd->rcClient.bottom;
1003/* Do this until Init bug is fixed. This sets 640x480, see InitMetrics.
1004 lpRect->right = GetSystemMetrics(SM_CXSCREEN);
1005 lpRect->bottom = GetSystemMetrics(SM_CYSCREEN);
1006*/ }
1007 return TRUE;
1008}
1009
1010
1011/*
1012 * @implemented
1013 */
1016{
1017 PWND Wnd;
1018 HWND Ret = hWnd;
1019
1020 Wnd = ValidateHwnd(hWnd);
1021 if (Wnd != NULL)
1022 {
1023 _SEH2_TRY
1024 {
1025 if (Wnd->spwndLastActive)
1026 {
1027 PWND LastActive = DesktopPtrToUser(Wnd->spwndLastActive);
1028 Ret = UserHMGetHandle(LastActive);
1029 }
1030 }
1032 {
1033 /* Do nothing */
1034 }
1035 _SEH2_END;
1036 }
1037 return Ret;
1038}
1039
1040
1041/*
1042 * @implemented
1043 */
1046{
1047 PWND Wnd, WndParent;
1048 HWND Ret = NULL;
1049
1050 Wnd = ValidateHwnd(hWnd);
1051 if (Wnd != NULL)
1052 {
1053 _SEH2_TRY
1054 {
1055 WndParent = NULL;
1056 if (Wnd->style & WS_POPUP)
1057 {
1058 if (Wnd->spwndOwner != NULL)
1059 WndParent = DesktopPtrToUser(Wnd->spwndOwner);
1060 }
1061 else if (Wnd->style & WS_CHILD)
1062 {
1063 if (Wnd->spwndParent != NULL)
1064 WndParent = DesktopPtrToUser(Wnd->spwndParent);
1065 }
1066
1067 if (WndParent != NULL)
1068 Ret = UserHMGetHandle(WndParent);
1069 }
1071 {
1072 /* Do nothing */
1073 }
1074 _SEH2_END;
1075 }
1076
1077 return Ret;
1078}
1079
1080
1081/*
1082 * @implemented
1083 */
1086{
1088}
1089
1090
1091/*
1092 * @implemented
1093 */
1096 UINT uCmd)
1097{
1098 PWND Wnd, FoundWnd;
1099 HWND Ret = NULL;
1100
1101 Wnd = ValidateHwnd(hWnd);
1102 if (!Wnd)
1103 return NULL;
1104
1105 _SEH2_TRY
1106 {
1107 FoundWnd = NULL;
1108 switch (uCmd)
1109 {
1110 case GW_OWNER:
1111 if (Wnd->spwndOwner != NULL)
1112 FoundWnd = DesktopPtrToUser(Wnd->spwndOwner);
1113 break;
1114
1115 case GW_HWNDFIRST:
1116 if(Wnd->spwndParent != NULL)
1117 {
1118 FoundWnd = DesktopPtrToUser(Wnd->spwndParent);
1119 if (FoundWnd->spwndChild != NULL)
1120 FoundWnd = DesktopPtrToUser(FoundWnd->spwndChild);
1121 }
1122 break;
1123 case GW_HWNDNEXT:
1124 if (Wnd->spwndNext != NULL)
1125 FoundWnd = DesktopPtrToUser(Wnd->spwndNext);
1126 break;
1127
1128 case GW_HWNDPREV:
1129 if (Wnd->spwndPrev != NULL)
1130 FoundWnd = DesktopPtrToUser(Wnd->spwndPrev);
1131 break;
1132
1133 case GW_CHILD:
1134 if (Wnd->spwndChild != NULL)
1135 FoundWnd = DesktopPtrToUser(Wnd->spwndChild);
1136 break;
1137
1138 case GW_HWNDLAST:
1139 FoundWnd = Wnd;
1140 while ( FoundWnd->spwndNext != NULL)
1141 FoundWnd = DesktopPtrToUser(FoundWnd->spwndNext);
1142 break;
1143
1144 case GW_ENABLEDPOPUP:
1145 {
1147 if (pwndPopup)
1148 FoundWnd = DesktopPtrToUser(pwndPopup);
1149 break;
1150 }
1151
1152 default:
1153 {
1155 break;
1156 }
1157 }
1158
1159 if (FoundWnd != NULL)
1160 Ret = UserHMGetHandle(FoundWnd);
1161 }
1163 {
1164 /* Do nothing */
1165 }
1166 _SEH2_END;
1167
1168 return Ret;
1169}
1170
1171
1172/*
1173 * @implemented
1174 */
1177{
1178 if (!hWnd) hWnd = GetDesktopWindow();
1179 return GetWindow(hWnd, GW_CHILD);
1180}
1181
1182
1183/*
1184 * @implemented
1185 */
1186BOOL
1187WINAPI
1190 PWINDOWINFO pwi)
1191{
1192 PWND pWnd;
1193 PCLS pCls = NULL;
1194 SIZE Size = {0,0};
1195 BOOL Ret = FALSE;
1196
1197 if ( !pwi || pwi->cbSize != sizeof(WINDOWINFO))
1198 SetLastError(ERROR_INVALID_PARAMETER); // Just set the error and go!
1199
1200 pWnd = ValidateHwnd(hWnd);
1201 if (!pWnd)
1202 return Ret;
1203
1204 UserGetWindowBorders(pWnd->style, pWnd->ExStyle, &Size, FALSE);
1205
1206 _SEH2_TRY
1207 {
1208 pCls = DesktopPtrToUser(pWnd->pcls);
1209 pwi->rcWindow = pWnd->rcWindow;
1210 pwi->rcClient = pWnd->rcClient;
1211 pwi->dwStyle = pWnd->style;
1212 pwi->dwExStyle = pWnd->ExStyle;
1213 pwi->cxWindowBorders = Size.cx;
1214 pwi->cyWindowBorders = Size.cy;
1215 pwi->dwWindowStatus = 0;
1216 if (pWnd->state & WNDS_ACTIVEFRAME || (GetActiveWindow() == hWnd))
1218 pwi->atomWindowType = (pCls ? pCls->atomClassName : 0 );
1219
1220 if ( pWnd->state2 & WNDS2_WIN50COMPAT )
1221 {
1222 pwi->wCreatorVersion = 0x500;
1223 }
1224 else if ( pWnd->state2 & WNDS2_WIN40COMPAT )
1225 {
1226 pwi->wCreatorVersion = 0x400;
1227 }
1228 else if ( pWnd->state2 & WNDS2_WIN31COMPAT )
1229 {
1230 pwi->wCreatorVersion = 0x30A;
1231 }
1232 else
1233 {
1234 pwi->wCreatorVersion = 0x300;
1235 }
1236
1237 Ret = TRUE;
1238 }
1240 {
1241 /* Do nothing */
1242 }
1243 _SEH2_END;
1244
1245 return Ret;
1246}
1247
1248
1249/*
1250 * @implemented
1251 */
1254 LPSTR lpszFileName,
1255 UINT cchFileNameMax)
1256{
1257 PWND Wnd = ValidateHwnd(hwnd);
1258
1259 if (!Wnd)
1260 return 0;
1261
1262 return GetModuleFileNameA(Wnd->hModule, lpszFileName, cchFileNameMax);
1263}
1264
1265
1266/*
1267 * @implemented
1268 */
1271 LPWSTR lpszFileName,
1272 UINT cchFileNameMax)
1273{
1274 PWND Wnd = ValidateHwnd(hwnd);
1275
1276 if (!Wnd)
1277 return 0;
1278
1279 return GetModuleFileNameW( Wnd->hModule, lpszFileName, cchFileNameMax );
1280}
1281
1282/*
1283 * @implemented
1284 */
1287 LPRECT lpRect)
1288{
1289 PWND Wnd = ValidateHwnd(hWnd);
1290
1291 if (!Wnd) return FALSE;
1292 if ( hWnd != GetDesktopWindow()) // Wnd->fnid != FNID_DESKTOP )
1293 {
1294 *lpRect = Wnd->rcWindow;
1295 }
1296 else
1297 {
1298 lpRect->left = lpRect->top = 0;
1299 lpRect->right = Wnd->rcWindow.right;
1300 lpRect->bottom = Wnd->rcWindow.bottom;
1301/* Do this until Init bug is fixed. This sets 640x480, see InitMetrics.
1302 lpRect->right = GetSystemMetrics(SM_CXSCREEN);
1303 lpRect->bottom = GetSystemMetrics(SM_CYSCREEN);
1304*/ }
1305 return TRUE;
1306}
1307
1308/*
1309 * @implemented
1310 */
1311int WINAPI
1313{
1314 PWND Wnd;
1315 INT Length = 0;
1316
1317 if (lpString == NULL || nMaxCount == 0)
1318 return 0;
1319
1320 Wnd = ValidateHwnd(hWnd);
1321 if (!Wnd)
1322 return 0;
1323
1324 lpString[0] = '\0';
1325
1326 if (!TestWindowProcess(Wnd))
1327 {
1328 _SEH2_TRY
1329 {
1331 }
1333 {
1334 Length = 0;
1335 }
1336 _SEH2_END;
1337 }
1338 else
1339 {
1341 }
1342 //ERR("GWTA Len %d : %s\n",Length,lpString);
1343 return Length;
1344}
1345
1346/*
1347 * @implemented
1348 */
1349int WINAPI
1351{
1352 PWND Wnd;
1353
1354 Wnd = ValidateHwnd(hWnd);
1355 if (!Wnd)
1356 return 0;
1357
1358 if (!TestWindowProcess(Wnd))
1359 {
1360 return DefWindowProcA(hWnd, WM_GETTEXTLENGTH, 0, 0);
1361 }
1362 else
1363 {
1364 return SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0);
1365 }
1366}
1367
1368/*
1369 * @implemented
1370 */
1371int WINAPI
1373{
1374 PWND Wnd;
1375
1376 Wnd = ValidateHwnd(hWnd);
1377 if (!Wnd)
1378 return 0;
1379
1380 if (!TestWindowProcess(Wnd))
1381 {
1382 return DefWindowProcW(hWnd, WM_GETTEXTLENGTH, 0, 0);
1383 }
1384 else
1385 {
1386 return SendMessageW(hWnd, WM_GETTEXTLENGTH, 0, 0);
1387 }
1388}
1389
1390/*
1391 * @implemented
1392 */
1393int WINAPI
1395{
1396 PWND Wnd;
1397 INT Length = 0;
1398
1399 if (lpString == NULL || nMaxCount == 0)
1400 return 0;
1401
1402 Wnd = ValidateHwnd(hWnd);
1403 if (!Wnd)
1404 return 0;
1405
1406 lpString[0] = L'\0';
1407
1408 if (!TestWindowProcess(Wnd))
1409 {
1410 _SEH2_TRY
1411 {
1413 }
1415 {
1416 Length = 0;
1417 }
1418 _SEH2_END;
1419 }
1420 else
1421 {
1423 }
1424 //ERR("GWTW Len %d : %S\n",Length,lpString);
1425 return Length;
1426}
1427
1430 LPDWORD lpdwProcessId)
1431{
1432 DWORD Ret = 0;
1433 PTHREADINFO ti;
1434 PWND pWnd = ValidateHwnd(hWnd);
1435
1436 if (!pWnd) return Ret;
1437
1438 ti = pWnd->head.pti;
1439
1440 if (ti)
1441 {
1442 if (ti == GetW32ThreadInfo())
1443 { // We are current.
1444 //FIXME("Current!\n");
1445 if (lpdwProcessId)
1446 *lpdwProcessId = (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueProcess;
1447 Ret = (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueThread;
1448 }
1449 else
1450 { // Ask kernel for info.
1451 //FIXME("Kernel call!\n");
1452 if (lpdwProcessId)
1455 }
1456 }
1457 return Ret;
1458}
1459
1460
1461/*
1462 * @implemented
1463 */
1466 HWND hWnd)
1467{
1468 PWND WndParent, DesktopWnd, Wnd;
1469 BOOL Ret = FALSE;
1470
1471 WndParent = ValidateHwnd(hWndParent);
1472 if (!WndParent)
1473 return FALSE;
1474 Wnd = ValidateHwnd(hWnd);
1475 if (!Wnd)
1476 return FALSE;
1477
1478 DesktopWnd = GetThreadDesktopWnd();
1479 if (!DesktopWnd)
1480 return FALSE;
1481
1482 _SEH2_TRY
1483 {
1484 while (Wnd != NULL && ((Wnd->style & (WS_POPUP|WS_CHILD)) == WS_CHILD))
1485 {
1486 if (Wnd->spwndParent != NULL)
1487 {
1488 Wnd = DesktopPtrToUser(Wnd->spwndParent);
1489
1490 if (Wnd == WndParent)
1491 {
1492 Ret = TRUE;
1493 break;
1494 }
1495 }
1496 else
1497 break;
1498 }
1499 }
1501 {
1502 /* Do nothing */
1503 }
1504 _SEH2_END;
1505
1506 return Ret;
1507}
1508
1509
1510/*
1511 * @implemented
1512 */
1515{
1516 PWND Wnd = ValidateHwnd(hWnd);
1517
1518 if (Wnd != NULL)
1519 return (Wnd->style & WS_MINIMIZE) != 0;
1520
1521 return FALSE;
1522}
1523
1524
1525/*
1526 * @implemented
1527 */
1530{
1532 if (Wnd != NULL)
1533 {
1534 if (Wnd->state & WNDS_DESTROYED)
1535 return FALSE;
1536 return TRUE;
1537 }
1538
1539 return FALSE;
1540}
1541
1542
1543/*
1544 * @implemented
1545 */
1548{
1549 PWND Wnd = ValidateHwnd(hWnd);
1550
1551 if (Wnd != NULL)
1552 return Wnd->Unicode;
1553
1554 return FALSE;
1555}
1556
1557
1558/*
1559 * @implemented
1560 */
1563{
1564 BOOL Ret = FALSE;
1565 PWND Wnd = ValidateHwnd(hWnd);
1566
1567 if (Wnd != NULL)
1568 {
1569 _SEH2_TRY
1570 {
1571 Ret = TRUE;
1572
1573 do
1574 {
1575 if (!(Wnd->style & WS_VISIBLE))
1576 {
1577 Ret = FALSE;
1578 break;
1579 }
1580
1581 if (Wnd->spwndParent != NULL)
1582 Wnd = DesktopPtrToUser(Wnd->spwndParent);
1583 else
1584 break;
1585
1586 } while (Wnd != NULL);
1587 }
1589 {
1590 Ret = FALSE;
1591 }
1592 _SEH2_END;
1593 }
1594
1595 return Ret;
1596}
1597
1598
1599/*
1600 * @implemented
1601 */
1604{
1605 // AG: I don't know if child windows are affected if the parent is
1606 // disabled. I think they stop processing messages but stay appearing
1607 // as enabled.
1608
1610}
1611
1612
1613/*
1614 * @implemented
1615 */
1618{
1619 return (GetWindowLongPtrW(hWnd, GWL_STYLE) & WS_MAXIMIZE) != 0;
1620}
1621
1622
1623/*
1624 * @implemented
1625 */
1628{
1629 return NtUserxLockSetForegroundWindow(uLockCode);
1630}
1631
1632
1633/*
1634 * @implemented
1635 */
1638 DWORD dwTime,
1639 DWORD dwFlags)
1640{
1641 /* FIXME Add animation code */
1642
1643 /* If trying to show/hide and it's already *
1644 * shown/hidden or invalid window, fail with *
1645 * invalid parameter */
1646
1647 BOOL visible;
1648 visible = IsWindowVisible(hwnd);
1649 if(!IsWindow(hwnd) ||
1650 (visible && !(dwFlags & AW_HIDE)) ||
1651 (!visible && (dwFlags & AW_HIDE)))
1652 {
1654 return FALSE;
1655 }
1656
1657 ShowWindow(hwnd, (dwFlags & AW_HIDE) ? SW_HIDE : ((dwFlags & AW_ACTIVATE) ? SW_SHOW : SW_SHOWNA));
1658
1659 return TRUE;
1660}
1661
1662
1663/*
1664 * @implemented
1665 */
1668{
1670 return FALSE;
1671
1673 return TRUE;
1674}
1675
1676
1677/*
1678 * @implemented
1679 */
1682 POINT ptParentClientCoords)
1683{
1684 return NtUserRealChildWindowFromPoint(hwndParent, ptParentClientCoords.x, ptParentClientCoords.y);
1685}
1686
1687/*
1688 * @unimplemented
1689 */
1692{
1694}
1695
1696
1697/*
1698 * @implemented
1699 */
1702{
1704}
1705
1706
1707/*
1708 * @implemented
1709 */
1710BOOL
1711WINAPI
1714 LPCSTR lpString)
1715{
1716 PWND pwnd;
1717
1718 pwnd = ValidateHwnd(hWnd);
1719 if (pwnd)
1720 {
1721 if (!TestWindowProcess(pwnd))
1722 {
1723 /* do not send WM_GETTEXT messages to other processes */
1724 return (DefWindowProcA(hWnd, WM_SETTEXT, 0, (LPARAM)lpString) >= 0);
1725 }
1726 return (SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)lpString) >= 0);
1727 }
1728 return FALSE;
1729}
1730
1731
1732/*
1733 * @implemented
1734 */
1735BOOL
1736WINAPI
1739 LPCWSTR lpString)
1740{
1741 PWND pwnd;
1742
1743 pwnd = ValidateHwnd(hWnd);
1744 if (pwnd)
1745 {
1746 if (!TestWindowProcess(pwnd))
1747 {
1748 /* do not send WM_GETTEXT messages to other processes */
1749 return (DefWindowProcW(hWnd, WM_SETTEXT, 0, (LPARAM)lpString) >= 0);
1750 }
1751 return (SendMessageW(hWnd, WM_SETTEXT, 0, (LPARAM)lpString) >= 0);
1752 }
1753 return FALSE;
1754}
1755
1756
1757/*
1758 * @implemented
1759 */
1762{
1763 return NtUserxShowOwnedPopups(hWnd, fShow);
1764}
1765
1766
1767/*
1768 * @implemented
1769 */
1772 HDC hdcDst,
1773 POINT *pptDst,
1774 SIZE *psize,
1775 HDC hdcSrc,
1776 POINT *pptSrc,
1777 COLORREF crKey,
1778 BLENDFUNCTION *pbl,
1779 DWORD dwFlags)
1780{
1781 if (dwFlags & ULW_EX_NORESIZE) /* only valid for UpdateLayeredWindowIndirect */
1782 {
1784 return FALSE;
1785 }
1787 hdcDst,
1788 pptDst,
1789 psize,
1790 hdcSrc,
1791 pptSrc,
1792 crKey,
1793 pbl,
1794 dwFlags,
1795 NULL);
1796}
1797
1798/*
1799 * @implemented
1800 */
1803 const UPDATELAYEREDWINDOWINFO *info)
1804{
1805 if (info && info->cbSize == sizeof(*info))
1806 {
1808 info->hdcDst,
1809 (POINT *)info->pptDst,
1810 (SIZE *)info->psize,
1811 info->hdcSrc,
1812 (POINT *)info->pptSrc,
1813 info->crKey,
1814 (BLENDFUNCTION *)info->pblend,
1815 info->dwFlags,
1816 (RECT *)info->prcDirty);
1817 }
1819 return FALSE;
1820}
1821
1822/*
1823 * @implemented
1824 */
1827 DWORD dwContextHelpId)
1828{
1829 return NtUserxSetWindowContextHelpId(hwnd, dwContextHelpId);
1830}
1831
1832/*
1833 * @implemented
1834 */
1837{
1839}
1840
1841/*
1842 * @implemented
1843 */
1844int WINAPI
1846{
1848 if (Ret == 0 && lpString)
1849 *lpString = L'\0';
1850 return Ret;
1851}
1852
1853/*
1854 * @implemented
1855 */
1858{
1860}
1861
1862/*
1863 * @implemented
1864 */
1866SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
1867{
1868 SetLastError(dwErrCode);
1869}
1870
1871/*
1872 * @implemented
1873 */
1876{
1878}
1879
1882{
1884}
1885
1886/*
1887 * @implemented
1888 */
1891{
1893}
1894
1895/*
1896 * @implemented
1897 */
1900{
1902}
1903
1904/*
1905 * @implemented
1906 */
1909{
1911}
1912
1913/*
1914 * @implemented
1915 */
1918{
1920}
1921
1922/*
1923 * @implemented
1924 */
1927 int dx,
1928 int dy,
1929 CONST RECT *lpRect,
1930 CONST RECT *prcClip)
1931{
1933 dx,
1934 dy,
1935 lpRect,
1936 prcClip,
1937 0,
1938 NULL,
1940}
1941
1942/* ScrollWindow uses the window DC, ScrollWindowEx doesn't */
1943
1944/*
1945 * @implemented
1946 */
1947INT WINAPI
1949 int dx,
1950 int dy,
1951 CONST RECT *prcScroll,
1952 CONST RECT *prcClip,
1953 HRGN hrgnUpdate,
1954 LPRECT prcUpdate,
1955 UINT flags)
1956{
1957 if (flags & SW_SMOOTHSCROLL)
1958 {
1959 FIXME("SW_SMOOTHSCROLL not supported.\n");
1960 // Fall through....
1961 }
1963 dx,
1964 dy,
1965 prcScroll,
1966 prcClip,
1967 hrgnUpdate,
1968 prcUpdate,
1969 flags);
1970}
1971
1972/*
1973 * @implemented
1974 */
1977{
1978 int i;
1979 BOOL retvalue;
1981
1982 if (!list) return FALSE;
1983 for (i = 0; list[i]; i++)
1984 {
1985 if (IsWindowVisible( list[i] ) && GetWindow( list[i], GW_OWNER )) break;
1986 }
1987 retvalue = (list[i] != 0);
1988 HeapFree( GetProcessHeap(), 0, list );
1989 return retvalue;
1990}
1991
1992/*
1993 * @implemented
1994 */
1997{
1998 PWND pwnd;
1999 pwnd = ValidateHwnd(hWnd);
2000 if (!pwnd)
2001 return FALSE;
2002 return ((pwnd->state2 & WNDS2_INDESTROY) == WNDS2_INDESTROY);
2003}
2004
2005/*
2006 * @implemented
2007 */
2010{
2012}
2013
2014/* EOF */
2015
#define CW_USEDEFAULT16
Definition: resource.h:7
HWND hWnd
Definition: settings.c:17
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
LONG NTSTATUS
Definition: precomp.h:26
#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:97
CHAR AnsiBuffer[1024]
Definition: debug.c:15
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:616
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:634
HINSTANCE hInstance
Definition: charmap.c:19
#define IS_ATOM(x)
Definition: class.h:3
Definition: list.h:37
LPARAM lParam
Definition: combotst.c:139
static HWND hwndParent
Definition: cryptui.c:300
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#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 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 FreeLibrary(x)
Definition: compat.h:748
#define HeapFree(x, y, z)
Definition: compat.h:735
#define MultiByteToWideChar
Definition: compat.h:110
#define ValidateHwnd(hwnd)
Definition: precomp.h:85
#define ValidateHwndNoErr(hwnd)
Definition: precomp.h:84
static PVOID FASTCALL DesktopPtrToUser(PVOID ptr)
Definition: utils.c:324
static void cleanup(void)
Definition: main.c:1335
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
Definition: loader.c:539
#define pt(x, y)
Definition: drawing.c:79
#define ERROR(name)
Definition: error_private.h:53
DWORD dwThreadId
Definition: fdebug.c:31
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
size_t total
ULONG Handle
Definition: gdb_input.c:15
Status
Definition: gdiplustypes.h:25
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLbitfield flags
Definition: glext.h:7161
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
#define DbgPrint
Definition: hal.h:12
static const WCHAR titleW[]
Definition: htmlelem.c:1067
#define WNDS2_WIN31COMPAT
Definition: ntuser.h:649
BOOL NTAPI NtUserUpdateLayeredWindow(HWND hwnd, HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags, RECT *prcDirty)
Definition: layered.c:341
#define QUERY_WINDOW_UNIQUE_THREAD_ID
Definition: ntuser.h:2828
VOID NTAPI RtlInitLargeAnsiString(IN OUT PLARGE_ANSI_STRING, IN PCSZ, IN INT)
Definition: rtlstr.c:17
#define WNDS2_WIN40COMPAT
Definition: ntuser.h:650
BOOL NTAPI NtUserSetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags)
Definition: winpos.c:3533
DWORD NTAPI NtUserScrollWindowEx(HWND hWnd, INT dx, INT dy, const RECT *rect, const RECT *clipRect, HRGN hrgnUpdate, LPRECT rcUpdate, UINT flags)
Definition: scrollex.c:571
DWORD_PTR NTAPI NtUserCallOneParam(DWORD_PTR Param, DWORD Routine)
Definition: simplecall.c:153
#define WNDS_ACTIVEFRAME
Definition: ntuser.h:611
HWND NTAPI NtUserRealChildWindowFromPoint(HWND Parent, LONG x, LONG y)
Definition: winpos.c:3513
#define WNDS_DESTROYED
Definition: ntuser.h:636
#define UserHMGetHandle(obj)
Definition: ntuser.h:230
ULONG RtlGetExpWinVer(_In_ PVOID BaseAddress)
Definition: image.c:20
#define QUERY_WINDOW_REAL_ID
Definition: ntuser.h:2832
struct _THREADINFO * GetW32ThreadInfo(VOID)
Definition: misc.c:807
struct _WND * PWND
HDWP NTAPI NtUserDeferWindowPos(HDWP WinPosInfo, HWND Wnd, HWND WndInsertAfter, int x, int y, int cx, int cy, UINT Flags)
Definition: winpos.c:3289
@ THREADSTATE_TASKMANWINDOW
Definition: ntuser.h:2492
@ THREADSTATE_PROGMANWINDOW
Definition: ntuser.h:2491
@ THREADSTATE_FOCUSWINDOW
Definition: ntuser.h:2472
@ ONEPARAM_ROUTINE_SETPROCDEFLAYOUT
Definition: ntuser.h:1601
@ HWND_ROUTINE_DWP_GETENABLEDPOPUP
Definition: ntuser.h:1613
@ ONEPARAM_ROUTINE_GETPROCDEFLAYOUT
Definition: ntuser.h:1568
BOOL NTAPI NtUserGetAltTabInfo(HWND hwnd, INT iItem, PALTTABINFO pati, LPWSTR pszItemText, UINT cchItemText, BOOL Ansi)
Definition: ntstubs.c:86
VOID NTAPI RtlInitLargeUnicodeString(IN OUT PLARGE_UNICODE_STRING, IN PCWSTR, IN INT)
Definition: rtlstr.c:42
#define WNDS2_INDESTROY
Definition: ntuser.h:648
#define QUERY_WINDOW_UNIQUE_PROCESS_ID
Definition: ntuser.h:2827
DWORD_PTR NTAPI NtUserGetThreadState(DWORD Routine)
Definition: misc.c:240
HWND NTAPI NtUserChildWindowFromPointEx(HWND Parent, LONG x, LONG y, UINT Flags)
Definition: winpos.c:3252
#define QUERY_WINDOW_ISHUNG
Definition: ntuser.h:2831
#define WNDS2_WIN50COMPAT
Definition: ntuser.h:651
DWORD_PTR NTAPI NtUserCallHwnd(HWND hWnd, DWORD Routine)
Definition: simplecall.c:711
BOOL NTAPI NtUserEndDeferWindowPosEx(HDWP WinPosInfo, BOOL bAsync)
Definition: winpos.c:3273
#define FNID_MDICLIENT
Definition: ntuser.h:872
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
#define NtCurrentTeb
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
static HDC
Definition: imagelist.c:88
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
unsigned int UINT
Definition: ndis.h:50
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
_Use_decl_annotations_ NTSTATUS NTAPI RtlMultiByteToUnicodeN(_Out_ PWCH UnicodeString, _In_ ULONG UnicodeSize, _Out_opt_ PULONG ResultSize, _In_ PCCH MbString, _In_ ULONG MbSize)
Definition: nlsboot.c:62
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define FASTCALL
Definition: nt_native.h:50
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define LPVOID
Definition: nt_native.h:45
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_Must_inspect_result_ _Out_ LPSIZE psize
Definition: ntgdi.h:1569
VOID UserGetWindowBorders(DWORD Style, DWORD ExStyle, SIZE *Size, BOOL WithClient)
Definition: winpos.c:894
#define L(x)
Definition: ntvdm.h:50
EXTINLINE BOOL NtUserxSetWindowContextHelpId(HWND hWnd, DWORD_PTR dwContextHelpId)
Definition: ntwrapper.h:706
EXTINLINE BOOL NtUserxAllowSetForegroundWindow(DWORD dwProcessId)
Definition: ntwrapper.h:836
EXTINLINE BOOL NtUserxLockSetForegroundWindow(UINT uLockCode)
Definition: ntwrapper.h:841
EXTINLINE HWND NtUserxSetTaskmanWindow(HWND hWnd)
Definition: ntwrapper.h:758
EXTINLINE DWORD NtUserxGetWindowContextHelpId(HWND hwnd)
Definition: ntwrapper.h:726
EXTINLINE VOID NtUserxEnableProcessWindowGhosting(BOOL bEnable)
Definition: ntwrapper.h:801
EXTINLINE VOID NtUserxSwitchToThisWindow(HWND hWnd, BOOL fAltTab)
Definition: ntwrapper.h:691
EXTINLINE BOOL NtUserxSetForegroundWindow(HWND hWnd)
Definition: ntwrapper.h:788
EXTINLINE BOOL NtUserxShowOwnedPopups(HWND hWnd, BOOL fShow)
Definition: ntwrapper.h:696
EXTINLINE HDWP NtUserxBeginDeferWindowPos(INT nNumWindows)
Definition: ntwrapper.h:651
EXTINLINE HWND NtUserxSetProgmanWindow(HWND hWnd)
Definition: ntwrapper.h:763
#define WS_CHILD
Definition: pedump.c:617
#define WS_CAPTION
Definition: pedump.c:624
#define CONST
Definition: pedump.c:81
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define WS_MAXIMIZEBOX
Definition: pedump.c:632
#define WS_MAXIMIZE
Definition: pedump.c:623
#define WS_SYSMENU
Definition: pedump.c:629
#define WS_POPUP
Definition: pedump.c:616
#define WS_MINIMIZE
Definition: pedump.c:622
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_DISABLED
Definition: pedump.c:621
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_MINIMIZEBOX
Definition: pedump.c:631
#define WS_THICKFRAME
Definition: pedump.c:630
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:82
#define _SEH2_END
Definition: pseh2_64.h:171
#define _SEH2_TRY
Definition: pseh2_64.h:71
DWORD RegisterDefaultClasses
Definition: regcontrol.c:13
BOOL WINAPI RegisterSystemControls(VOID)
Definition: regcontrol.c:70
BOOL FASTCALL VersionRegisterClass(PCWSTR, LPCWSTR, HANDLE, HMODULE *)
Definition: class.c:195
#define DECLSPEC_HOTPATCH
Definition: config.h:9
HINSTANCE hLibModule
Definition: sfc.c:23
#define STATUS_SUCCESS
Definition: shellext.h:65
#define TRACE(s)
Definition: solgame.cpp:4
DWORD dwTime
Definition: solitaire.cpp:27
Definition: ntuser.h:566
RTL_ATOM atomClassName
Definition: ntuser.h:568
ULONG Length
Definition: ntuser.h:91
ULONG MaximumLength
Definition: ntuser.h:92
PVOID Buffer
Definition: ntuser.h:94
USHORT MaximumLength
Definition: env_spec_w32.h:370
LPCSTR lpszMenuName
Definition: winuser.h:3221
UINT cbSize
Definition: winuser.h:3212
LPCWSTR lpszMenuName
Definition: winuser.h:3236
UINT cbSize
Definition: winuser.h:3227
Definition: ntuser.h:694
DWORD ExStyle
Definition: ntuser.h:704
PCLS pcls
Definition: ntuser.h:720
struct _WND * spwndOwner
Definition: ntuser.h:715
UINT Unicode
Definition: ntuser.h:756
struct _WND * spwndPrev
Definition: ntuser.h:712
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
struct _WND * spwndChild
Definition: ntuser.h:714
DWORD fnid
Definition: ntuser.h:709
RECT rcClient
Definition: ntuser.h:717
DWORD state
Definition: ntuser.h:701
struct _WND * spwndNext
Definition: ntuser.h:711
HINSTANCE hModule
Definition: ntuser.h:708
RECT rcWindow
Definition: ntuser.h:716
struct _WND * spwndParent
Definition: ntuser.h:713
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
RECT rcClient
Definition: winuser.h:3779
DWORD dwWindowStatus
Definition: winuser.h:3782
ATOM atomWindowType
Definition: winuser.h:3785
DWORD cbSize
Definition: winuser.h:3777
DWORD dwExStyle
Definition: winuser.h:3781
DWORD dwStyle
Definition: winuser.h:3780
WORD wCreatorVersion
Definition: winuser.h:3786
UINT cxWindowBorders
Definition: winuser.h:3783
UINT cyWindowBorders
Definition: winuser.h:3784
RECT rcWindow
Definition: winuser.h:3778
#define DWORD_PTR
Definition: treelist.c:76
uint16_t * PWSTR
Definition: typedefs.h:56
char * PSTR
Definition: typedefs.h:51
const uint16_t * PCWSTR
Definition: typedefs.h:57
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define NTAPI
Definition: typedefs.h:36
void * PVOID
Definition: typedefs.h:50
uint32_t * LPDWORD
Definition: typedefs.h:59
int32_t INT
Definition: typedefs.h:58
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
CONST char * PCSZ
Definition: umtypes.h:125
#define NUCWE_ANSI
Definition: undocuser.h:76
#define WS_EX_SETANSICREATOR
Definition: undocuser.h:28
#define SW_SCROLLWNDDCE
Definition: undocuser.h:92
#define WS_MINIMIZED
Definition: undocuser.h:18
PWND FASTCALL GetThreadDesktopWnd(VOID)
Definition: misc.c:397
HWND * WIN_ListChildren(HWND hWndparent)
Definition: mdi.c:139
VOID WINAPI UserSetLastError(IN DWORD dwErrCode)
Definition: misc.c:13
BOOL FASTCALL TestWindowProcess(PWND)
Definition: misc.c:166
static const WCHAR classW[]
Definition: lex.c:40
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
#define FORCEINLINE
Definition: wdftypes.h:67
struct _SENDASYNCPROC_CALLBACK_ARGUMENTS * PSENDASYNCPROC_CALLBACK_ARGUMENTS
HWND APIENTRY NtUserGetAncestor(HWND hWnd, UINT Type)
Definition: window.c:3413
DWORD_PTR APIENTRY NtUserQueryWindow(HWND hWnd, DWORD Index)
Definition: window.c:4194
HWND APIENTRY NtUserFindWindowEx(HWND hwndParent, HWND hwndChildAfter, PUNICODE_STRING ucClassName, PUNICODE_STRING ucWindowName, DWORD dwUnknown)
Definition: window.c:3146
HWND NTAPI NtUserCreateWindowEx(DWORD dwExStyle, PLARGE_STRING plstrClassName, PLARGE_STRING plstrClsVersion, PLARGE_STRING plstrWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam, DWORD dwFlags, PVOID acbiBuffer)
Definition: window.c:2669
NTSTATUS NTAPI NtUserBuildHwndList(HDESK hDesktop, HWND hwndParent, BOOLEAN bChildren, ULONG dwThreadId, ULONG cHwnd, HWND *phwndList, ULONG *pcHwndNeeded)
Definition: window.c:1521
INT APIENTRY NtUserInternalGetWindowText(HWND hWnd, LPWSTR lpString, INT nMaxCount)
Definition: window.c:4592
HWND WINAPI FindWindowExW(HWND hwndParent, HWND hwndChildAfter, LPCWSTR lpszClass, LPCWSTR lpszWindow)
Definition: window.c:830
HWND WINAPI ChildWindowFromPointEx(HWND hwndParent, POINT pt, UINT uFlags)
Definition: window.c:103
HWND WINAPI FindWindowExA(HWND hwndParent, HWND hwndChildAfter, LPCSTR lpszClass, LPCSTR lpszWindow)
Definition: window.c:795
BOOL WINAPI EnumWindows(WNDENUMPROC lpEnumFunc, LPARAM lParam)
Definition: window.c:772
BOOL WINAPI UpdateLayeredWindow(HWND hwnd, HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pbl, DWORD dwFlags)
Definition: window.c:1771
int WINAPI InternalGetWindowText(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1845
BOOL WINAPI CloseWindow(HWND hWnd)
Definition: window.c:115
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
Definition: window.c:1312
BOOL WINAPI IsChild(HWND hWndParent, HWND hWnd)
Definition: window.c:1465
BOOL WINAPI DECLSPEC_HOTPATCH SetWindowTextA(HWND hWnd, LPCSTR lpString)
Definition: window.c:1713
BOOL WINAPI IsIconic(HWND hWnd)
Definition: window.c:1514
HWND WINAPI GetWindow(HWND hWnd, UINT uCmd)
Definition: window.c:1095
UINT WINAPI GetWindowModuleFileNameW(HWND hwnd, LPWSTR lpszFileName, UINT cchFileNameMax)
Definition: window.c:1270
VOID WINAPI SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
Definition: window.c:1866
HWND WINAPI SetTaskmanWindow(HWND hWnd)
Definition: window.c:1890
BOOL WINAPI IsZoomed(HWND hWnd)
Definition: window.c:1617
HWND WINAPI GetTopWindow(HWND hWnd)
Definition: window.c:1176
BOOL WINAPI SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
Definition: window.c:1826
static BOOL User32EnumWindows(HDESK hDesktop, HWND hWndparent, WNDENUMPROC lpfn, LPARAM lParam, DWORD dwThreadId, BOOL bChildren)
Definition: window.c:650
FORCEINLINE VOID RtlInitLargeString(OUT PLARGE_STRING plstr, LPCVOID psz, BOOL bUnicode)
Definition: window.c:124
VOID NTAPI RtlFreeLargeString(IN PLARGE_STRING LargeString)
Definition: window.c:141
UINT WINAPI GetWindowModuleFileNameA(HWND hwnd, LPSTR lpszFileName, UINT cchFileNameMax)
Definition: window.c:1253
BOOL WINAPI GetClientRect(HWND hWnd, LPRECT lpRect)
Definition: window.c:977
HWND WINAPI FindWindowW(LPCWSTR lpClassName, LPCWSTR lpWindowName)
Definition: window.c:882
BOOL WINAPI GetAltTabInfoA(HWND hwnd, int iItem, PALTTABINFO pati, LPSTR pszItemText, UINT cchItemText)
Definition: window.c:904
BOOL WINAPI EnumChildWindows(HWND hWndParent, WNDENUMPROC lpEnumFunc, LPARAM lParam)
Definition: window.c:742
VOID WINAPI SwitchToThisWindow(HWND hwnd, BOOL fAltTab)
Definition: window.c:82
BOOL WINAPI IsWindowEnabled(HWND hWnd)
Definition: window.c:1603
HWND WINAPI GetLastActivePopup(HWND hWnd)
Definition: window.c:1015
HWND WINAPI GetParent(HWND hWnd)
Definition: window.c:1045
NTSTATUS WINAPI User32CallSendAsyncProcForKernel(PVOID Arguments, ULONG ArgumentLength)
Definition: window.c:24
HWND WINAPI ChildWindowFromPoint(HWND hWndParent, POINT Point)
Definition: window.c:92
BOOL WINAPI LockSetForegroundWindow(UINT uLockCode)
Definition: window.c:1627
BOOL WINAPI BringWindowToTop(HWND hWnd)
Definition: window.c:69
BOOL WINAPI GetProcessDefaultLayout(DWORD *pdwDefaultLayout)
Definition: window.c:1085
HWND WINAPI DECLSPEC_HOTPATCH CreateWindowExA(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
Definition: window.c:352
BOOL WINAPI EndDeferWindowPos(HDWP hWinPosInfo)
Definition: window.c:618
BOOL WINAPI IsWindowInDestroy(HWND hWnd)
Definition: window.c:1996
HDWP WINAPI BeginDeferWindowPos(int nNumWindows)
Definition: window.c:59
BOOL WINAPI DECLSPEC_HOTPATCH GetWindowInfo(HWND hWnd, PWINDOWINFO pwi)
Definition: window.c:1189
DWORD WINAPI GetRealWindowOwner(HWND hwnd)
Definition: window.c:1881
void MDI_CalcDefaultChildPos(HWND hwndClient, INT total, LPPOINT lpPos, INT delta, UINT *id)
Definition: mdi.c:308
BOOL WINAPI IsWindowUnicode(HWND hWnd)
Definition: window.c:1547
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
Definition: window.c:1701
int WINAPI GetWindowTextLengthA(HWND hWnd)
Definition: window.c:1350
HDWP WINAPI DeferWindowPos(HDWP hWinPosInfo, HWND hWnd, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
Definition: window.c:601
HWND WINAPI GetAncestor(HWND hwnd, UINT gaFlags)
Definition: window.c:932
BOOL WINAPI IsHungAppWindow(HWND hwnd)
Definition: window.c:1857
BOOL WINAPI EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam)
Definition: window.c:758
int WINAPI GetWindowTextLengthW(HWND hWnd)
Definition: window.c:1372
BOOL WINAPI EnumDesktopWindows(HDESK hDesktop, WNDENUMPROC lpfn, LPARAM lParam)
Definition: window.c:783
BOOL WINAPI AllowSetForegroundWindow(DWORD dwProcessId)
Definition: window.c:49
BOOL WINAPI OpenIcon(HWND hWnd)
Definition: window.c:1667
BOOL WINAPI ScrollWindow(HWND hWnd, int dx, int dy, CONST RECT *lpRect, CONST RECT *prcClip)
Definition: window.c:1926
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, LPDWORD lpdwProcessId)
Definition: window.c:1429
HWND WINAPI RealChildWindowFromPoint(HWND hwndParent, POINT ptParentClientCoords)
Definition: window.c:1681
BOOL WINAPI AnimateWindow(HWND hwnd, DWORD dwTime, DWORD dwFlags)
Definition: window.c:1637
BOOL WINAPI GetAltTabInfoW(HWND hwnd, int iItem, PALTTABINFO pati, LPWSTR pszItemText, UINT cchItemText)
Definition: window.c:918
BOOL WINAPI UpdateLayeredWindowIndirect(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info)
Definition: window.c:1802
BOOL WINAPI ShowOwnedPopups(HWND hWnd, BOOL fShow)
Definition: window.c:1761
LPCWSTR FASTCALL ClassNameToVersion(const void *lpszClass, LPCWSTR lpszMenuName, LPCWSTR *plpLibFileName, HANDLE *pContext, BOOL bAnsi)
Definition: class.c:85
HWND WINAPI SetProgmanWindow(HWND hWnd)
Definition: window.c:1899
VOID WINAPI DisableProcessWindowsGhosting(VOID)
Definition: window.c:2009
DWORD WINAPI GetWindowContextHelpId(HWND hwnd)
Definition: window.c:1836
INT WINAPI ScrollWindowEx(HWND hWnd, int dx, int dy, CONST RECT *prcScroll, CONST RECT *prcClip, HRGN hrgnUpdate, LPRECT prcUpdate, UINT flags)
Definition: window.c:1948
HWND WINAPI FindWindowA(LPCSTR lpClassName, LPCSTR lpWindowName)
Definition: window.c:870
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1394
HWND WINAPI User32CreateWindowEx(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam, DWORD dwFlags)
Definition: window.c:152
HWND WINAPI GetProgmanWindow(void)
Definition: input.c:992
HWND WINAPI GetTaskmanWindow(void)
Definition: input.c:1009
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
DWORD COLORREF
Definition: windef.h:300
CONST void * LPCVOID
Definition: windef.h:191
#define WINAPI
Definition: msvc.h:6
#define ERROR_INVALID_GW_COMMAND
Definition: winerror.h:924
#define ERROR_CANNOT_FIND_WND_CLASS
Definition: winerror.h:888
HWND WINAPI GetFocus(void)
Definition: window.c:1875
#define GW_OWNER
Definition: winuser.h:777
#define GW_HWNDFIRST
Definition: winuser.h:775
BOOL WINAPI IsWindow(_In_opt_ HWND)
HWND WINAPI GetActiveWindow(void)
Definition: winpos.c:138
#define SM_CXMINIMIZED
Definition: winuser.h:1031
#define WM_GETTEXTLENGTH
Definition: winuser.h:1630
#define SW_HIDE
Definition: winuser.h:779
#define GW_HWNDLAST
Definition: winuser.h:776
#define GetWindowLongPtrW
Definition: winuser.h:4840
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SW_SCROLLCHILDREN
Definition: winuser.h:2589
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define SM_CYMINIMIZED
Definition: winuser.h:1032
#define SWP_NOMOVE
Definition: winuser.h:1255
#define SW_INVALIDATE
Definition: winuser.h:2590
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
BOOL WINAPI SetForegroundWindow(_In_ HWND)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GA_PARENT
Definition: winuser.h:2799
#define GW_ENABLEDPOPUP
Definition: winuser.h:778
BOOL WINAPI GetClassInfoExA(_In_opt_ HINSTANCE, _In_ LPCSTR, _Out_ LPWNDCLASSEXA)
#define SWP_NOSIZE
Definition: winuser.h:1256
#define WM_GETTEXT
Definition: winuser.h:1629
BOOL WINAPI GetClassInfoExW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSEXW)
#define MDIS_ALLCHILDSTYLES
Definition: winuser.h:253
#define GW_HWNDNEXT
Definition: winuser.h:772
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:628
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define WM_SETTEXT
Definition: winuser.h:1628
#define SW_SHOWMINIMIZED
Definition: winuser.h:782
#define HWND_TOP
Definition: winuser.h:1218
#define WS_EX_MDICHILD
Definition: winuser.h:394
#define SW_SHOWNA
Definition: winuser.h:789
_In_ int nMaxCount
Definition: winuser.h:4888
HWND WINAPI SetActiveWindow(_In_ HWND)
#define ULW_EX_NORESIZE
Definition: winuser.h:2798
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define CW_USEDEFAULT
Definition: winuser.h:225
#define SW_RESTORE
Definition: winuser.h:790
#define SW_ERASE
Definition: winuser.h:2591
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define GW_HWNDPREV
Definition: winuser.h:773
#define SW_SHOW
Definition: winuser.h:786
#define GW_CHILD
Definition: winuser.h:774
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI AnyPopup(void)
Definition: window.c:1976
#define WS_ACTIVECAPTION
Definition: winuser.h:2670
#define GWL_STYLE
Definition: winuser.h:863
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL(CALLBACK * WNDENUMPROC)(HWND, LPARAM)
Definition: winuser.h:2919
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_SETREDRAW
Definition: winuser.h:1627
HMENU WINAPI LoadMenuA(_In_opt_ HINSTANCE, _In_ LPCSTR)
static HDC hdcSrc
Definition: xlate.c:32
static HDC hdcDst
Definition: xlate.c:32
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185