38#define WM_SYSTIMER 0x0118
41#define LONG_PTR INT_PTR
42#define ULONG_PTR UINT_PTR
45#define DCX_USESTYLE 0x00010000
55static BOOL (
WINAPI *pUpdateLayeredWindowIndirect)(
HWND,
const UPDATELAYEREDWINDOWINFO*);
61static BOOL (
WINAPI *pFlashWindowEx)( PFLASHWINFO pfwi );
87 ok(
res,
"GetKeyboardState failed.\n");
90 ok(
res,
"SetKeyboardState failed.\n");
99 ok(
res,
"GetKeyboardState failed.\n");
102 ok(
res,
"SetKeyboardState failed.\n");
107 trace(
"Reserved=%ld,%ld MaxSize=%ld,%ld MaxPos=%ld,%ld MinTrack=%ld,%ld MaxTrack=%ld,%ld\n",
120 int min_timeout = 100;
140 ok(
res == ga_parent,
"Wrong result for GA_PARENT %p expected %p\n",
res, ga_parent );
142 ok(
res == gwl_parent,
"Wrong result for GWL_HWNDPARENT %p expected %p\n",
res, gwl_parent );
144 ok(
res == get_parent,
"Wrong result for GetParent %p expected %p\n",
res, get_parent );
146 ok(
res == gw_owner,
"Wrong result for GW_OWNER %p expected %p\n",
res, gw_owner );
148 ok(
res == ga_root,
"Wrong result for GA_ROOT %p expected %p\n",
res, ga_root );
150 ok(
res == ga_root_owner,
"Wrong result for GA_ROOTOWNER %p expected %p\n",
res, ga_root_owner );
153#define check_wnd_state(a,b,c,d) check_wnd_state_(__FILE__,__LINE__,a,b,c,d)
168#define check_active_state(a,b,c) check_active_state_(__FILE__,__LINE__,a,b,c)
240 ok(
ret != 0,
"Creation failed\n" );
260 ok( !
test,
"WS_CHILD without parent created\n" );
442 ok( !
ret,
"Set GWL_HWNDPARENT succeeded on desktop\n" );
464 ok(
ret == 0,
"GWL_HWNDPARENT return value %p expected 0\n",
ret );
468 ok(
ret == 0,
"GWL_HWNDPARENT return value %p expected 0\n",
ret );
481 ok(
ret == 0,
"GWL_HWNDPARENT return value %p expected 0\n",
ret );
498 ok(
ret == 0,
"GWL_HWNDPARENT return value %p expected 0\n",
ret );
519 ok(
ret == desktop,
"SetParent return value %p expected %p\n",
ret, desktop );
532 ok(
ret == desktop,
"SetParent return value %p expected %p\n",
ret, desktop );
547 ok(
ret == desktop,
"SetParent return value %p expected %p\n",
ret, desktop );
562 ok(
ret == desktop,
"SetParent return value %p expected %p\n",
ret, desktop );
571 ok( !
IsWindow(owner),
"Owner %p not destroyed\n", owner );
587 ok(
ret == 0,
"GWL_HWNDPARENT return value %p expected 0\n",
ret );
591 ok( !
IsWindow(owner),
"Owner %p not destroyed\n", owner );
608 "EnumChildWindows should have returned FALSE\n" );
609 ok( numChildren == 0,
"numChildren should be 0 got %d\n", numChildren );
613 ok(
ret == desktop,
"SetParent return value %p expected %p\n",
ret, desktop );
617 "EnumChildWindows should have returned TRUE\n" );
618 ok( numChildren == 1,
"numChildren should be 1 got %d\n", numChildren );
623 "EnumChildWindows should have returned FALSE\n" );
624 ok( numChildren == 2,
"numChildren should be 2 got %d\n", numChildren );
631 "EnumChildWindows should have returned TRUE\n" );
632 ok( numChildren == 1,
"numChildren should be 1 got %d\n", numChildren );
636 ok(
ret == desktop,
"SetParent return value %p expected %p\n",
ret, desktop );
639 "EnumChildWindows should have returned FALSE\n" );
640 ok( numChildren == 2,
"numChildren should be 2 got %d\n", numChildren );
644 ok(
ret == owner,
"SetParent return value %p expected %p\n",
ret, owner );
647 "EnumChildWindows should have returned TRUE\n" );
648 ok( numChildren == 1,
"numChildren should be 1 got %d\n", numChildren );
652 "EnumChildWindows should have found %p and returned FALSE\n",
child );
658 "EnumChildWindows should have found %p and returned FALSE\n",
child );
703 if (pGetGUIThreadInfo)
708 ok(
ret,
"GetGUIThreadInfo failed without message queue\n" );
712 ok( !
ret,
"GetGUIThreadInfo succeeded with wrong size\n" );
720 ok(
ret,
"EnumThreadWindows should have returned TRUE\n" );
724 0, 0, 100, 100, 0, 0, 0,
NULL );
727 ok(
ret,
"EnumThreadWindows should have returned TRUE\n" );
732 0, 0, 100, 100, 0, 0, 0,
NULL );
737 0, 0, 100, 100, 0, 0, 0,
NULL );
740 ok( !
ret,
"EnumThreadWindows should have returned FALSE\n" );
772 100, 100, 200, 200, 0, 0, 0,
NULL );
797 HWND adopter, child1, child2, child3,
child;
810 300, 100, 200, 200, 0, 0, 0,
NULL );
811 ok( adopter != 0,
"CreateWindowExW failed, error %lu\n",
GetLastError() );
820 ok( child1 != 0,
"CreateWindowExW failed, error %lu\n",
GetLastError() );
823 ok( child2 != 0,
"CreateWindowExW failed, error %lu\n",
GetLastError() );
826 ok( child3 != 0,
"CreateWindowExW failed, error %lu\n",
GetLastError() );
829 trace(
"parent %p adopter %p child1 %p child2 %p child3 %p\n",
params.hwnd, adopter, child1, child2, child3);
845 ok( old_wndproc !=
NULL,
"GetWindowLongPtrW GWLP_WNDPROC failed, error %lu\n",
GetLastError() );
857 ok(
ret,
"IsWindow returned %lu\n",
ret );
859 ok(
ret,
"IsWindow returned %lu\n",
ret );
861 ok(
ret,
"IsWindow returned %lu\n",
ret );
896 ok( tmp == 0,
"SetParent returned %p\n", tmp );
904 ok( tmp == 0,
"SetParent returned %p\n", tmp );
917 ok(
ret == 0,
"GetWindowLongW returned %#lx\n",
ret );
921 ok( wndproc !=
NULL,
"GetWindowLongPtrW GWLP_WNDPROC failed, error %lu\n",
GetLastError() );
922 ok( wndproc == old_wndproc,
"GetWindowLongPtrW GWLP_WNDPROC returned %p\n", wndproc );
930 0, 0, 100, 100, child1, 0, 0,
NULL );
945 ok(
ret,
"DestroyWindow returned %lu\n",
ret );
947 ok( !
ret,
"DestroyWindow returned %lu\n",
ret );
949 ok( !
ret,
"IsWindow returned %lu\n",
ret );
956 ok(
ret,
"IsWindow returned %lu\n",
ret );
964 ok( !
ret,
"SetWindowPos succeeded\n" );
978 ok( !
ret,
"SetWindowPos succeeded\n" );
1002 ok(
ret == 6,
"GetWindowTextW returned %lu\n",
ret );
1005 ok(
ret,
"IsWindow returned %lu\n",
ret );
1014 ok( !
ret,
"IsWindow returned %lu\n",
ret );
1017 ok( !
ret,
"IsWindow returned %lu\n",
ret );
1019 ok( !
ret,
"DestroyWindow returned %lu\n",
ret );
1049 ok(winpos->
x >= -32768 && winpos->
x <= 32767,
"bad winpos->x %d\n", winpos->
x);
1050 ok(winpos->
y >= -32768 && winpos->
y <= 32767,
"bad winpos->y %d\n", winpos->
y);
1054 ok((winpos->
cx >= 0 && winpos->
cx <= 32767) ||
1055 winpos->
cx == 32768,
1056 "bad winpos->cx %d\n", winpos->
cx);
1057 ok((winpos->
cy >= 0 && winpos->
cy <= 32767) ||
1058 winpos->
cy == 40000,
1059 "bad winpos->cy %d\n", winpos->
cy);
1068 ok(winpos->
x >= -32768 && winpos->
x <= 32767,
"bad winpos->x %d\n", winpos->
x);
1069 ok(winpos->
y >= -32768 && winpos->
y <= 32767,
"bad winpos->y %d\n", winpos->
y);
1071 ok((winpos->
cx >= 0 && winpos->
cx <= 32767) ||
1072 winpos->
cx == 32768,
1073 "bad winpos->cx %d\n", winpos->
cx);
1074 ok((winpos->
cy >= 0 && winpos->
cy <= 32767) ||
1075 winpos->
cy == 40000,
1076 "bad winpos->cy %d\n", winpos->
cy);
1099 ok(got_getminmaxinfo,
"main: WM_GETMINMAXINFO should have been received before WM_NCCREATE\n");
1101 ok(!got_getminmaxinfo,
"main: WM_GETMINMAXINFO should NOT have been received before WM_NCCREATE\n");
1117 ok(*
text == 0,
"expected empty string buffer %x\n", *
text);
1162 ok(*
text == 0,
"expected empty string buffer %x\n", *
text);
1167 static const WCHAR textW[] = {
't',
'e',
'x',
't'};
1204 ok(got_getminmaxinfo,
"tool: WM_GETMINMAXINFO should have been received before WM_NCCREATE\n");
1206 ok(!got_getminmaxinfo,
"tool: WM_GETMINMAXINFO should NOT have been received before WM_NCCREATE\n");
1221static const WCHAR mainclassW[] = {
'M',
'a',
'i',
'n',
'W',
'i',
'n',
'd',
'o',
'w',
'C',
'l',
'a',
's',
's',
'W',0};
1272 RECT rcWindow, rcClient;
1286 "wrong dwStyle: %08lx != %08lx for %p in hook %s\n",
1292 "wrong dwExStyle: %08lx != %08lx for %p in hook %s\n",
1296 ok(
info->dwWindowStatus ==
status,
"wrong dwWindowStatus: %04lx != %04lx active %p fg %p in hook %s\n",
1305 ok(
info->cxWindowBorders == (
unsigned)(rcClient.
left - rcWindow.
left),
1306 "wrong cxWindowBorders %d != %ld\n",
info->cxWindowBorders, rcClient.
left - rcWindow.
left);
1309 "wrong cyWindowBorders %d != %d\n",
info->cyWindowBorders,
border);
1313 ok(
info->wCreatorVersion == 0x0400 ||
1314 info->wCreatorVersion == 0x0500 ,
1315 "wrong wCreatorVersion %04x for %p in hook %s\n",
info->wCreatorVersion,
hwnd,
hook);
1323 ok(!pGetWindowInfo(
hwnd,
NULL),
"GetWindowInfo should fail\n");
1327 ok(!pGetWindowInfo(0,
NULL),
"GetWindowInfo should fail\n");
1329 "got error %ld expected ERROR_INVALID_WINDOW_HANDLE\n",
GetLastError());
1333 ok(!pGetWindowInfo(0, &
info),
"GetWindowInfo should fail\n");
1335 "got error %ld expected ERROR_INVALID_WINDOW_HANDLE\n",
GetLastError());
1338 ok(pGetWindowInfo(
hwnd, &
info),
"GetWindowInfo should not fail\n");
1350 ok(pGetWindowInfo(
hwnd, &
info),
"GetWindowInfo should not fail\n");
1351 ok(pGetWindowInfo(
hwnd, &info2),
"GetWindowInfo should not fail\n");
1352 ok(
memcmp(&
info, &info2,
sizeof(
WINDOWINFO)) == 0,
"identical GetWindowInfo calls produce different result\n");
1356 ok(pGetWindowInfo(
hwnd, &info2),
"GetWindowInfo should not fail\n");
1362 ok(pGetWindowInfo(
hwnd, &info2),
"GetWindowInfo should not fail\n");
1368 ok(pGetWindowInfo(
hwnd, &info2),
"GetWindowInfo should not fail\n");
1391 NONCLIENTMETRICSW ncm;
1394 ncm.cbSize =
offsetof( NONCLIENTMETRICSW, iPaddedBorderWidth );
1411 rect->top -= ncm.iSmCaptionHeight + 1;
1413 rect->top -= ncm.iCaptionHeight + 1;
1415 if (
menu)
rect->top -= ncm.iMenuHeight + 1;
1432 NONCLIENTMETRICSW ncm;
1435 ncm.cbSize =
sizeof(ncm);
1436 pSystemParametersInfoForDpi( SPI_GETNONCLIENTMETRICS,
sizeof(ncm), &ncm, 0,
dpi );
1453 rect->top -= ncm.iSmCaptionHeight + 1;
1455 rect->top -= ncm.iCaptionHeight + 1;
1457 if (
menu)
rect->top -= ncm.iMenuHeight + 1;
1484 ok(!
ret,
"got %08Ix (%08Ix %08Ix)\n",
ret, wp, lp);
1498 BOOL is_theme_active;
1500 RECT rc_window, rc_client, rc;
1517 rc_window.
right > 32768 || rc_window.
bottom > 32768)
return;
1524 "window rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d, win=%s, calc=%s\n",
1531 "window rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d, win=%s, calc=%s\n",
1540 "client rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d client=%s, calc=%s\n",
1545 ok(
ret == 0,
"NULL rectangle returned %Id instead of 0\n",
ret);
1548 SetRect(&rc_client, 0, 0, 250, 150);
1549 rc_window = rc_client;
1558 "synthetic rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d, client=%s, calc=%s\n",
1563 ok(!!uxtheme,
"Failed to load uxtheme.dll, error %lu.\n",
GetLastError());
1568 memset(&cls, 0,
sizeof(cls));
1600 ok(old_color == 0xc0c0c0,
"Expected color %#x, got %#lx.\n", 0xc0c0c0, old_color);
1610 ok(
color == old_color,
"Expected color %#lx, got %#lx.\n", old_color,
color);
1638 if (is_theme_active)
1640 "Got unexpected color %#lx.\n",
color);
1643 ok(
color == old_color,
"Expected color %#lx, got %#lx.\n", old_color,
color);
1655 static const char *CBT_code_name[10] = {
1662 "HCBT_CLICKSKIPPED",
1666 const char *code_name = (nCode >= 0 && nCode <=
HCBT_SETFOCUS) ? CBT_code_name[nCode] :
"Unknown";
1673 static const RECT rc_null;
1685 "style of hwnd and style in the CREATESTRUCT do not match: %08lx != %08lx\n",
1694 "wrong result from GetParent %p: message window %p\n",
1722 "GA_ROOTOWNER should be set to hwndMessage at this point\n");
1728 ok(
EqualRect(&rc, &rc_null),
"window rect should be set to 0 HCBT_CREATEWND\n");
1730 ok(
EqualRect(&rc, &rc_null),
"client rect should be set to 0 on HCBT_CREATEWND\n");
1756 HWND hwnd1, hwnd2, hwnd3, hwnd4, hwnd5;
1757 HWND shellWindow, nextWnd;
1758 HDESK testDesktop = (HDESK)
param;
1766 ok(shellWindow ==
NULL,
"Newly created desktop has a shell window %p\n", shellWindow);
1770 hwnd1 =
CreateWindowExA(0,
"#32770",
"TEST1",
WS_OVERLAPPEDWINDOW, 100, 100, 300, 200, 0, 0,
hinst, 0);
1773 ok(
ret,
"first call to SetShellWindow(hwnd1)\n");
1775 ok(shellWindow==hwnd1,
"wrong shell window: %p/%p\n", shellWindow,hwnd1);
1778 ok(!
ret,
"second call to SetShellWindow(hwnd1)\n");
1792 ok(!
ret,
"SetWindowExStyle(hwnd1, WS_EX_TOPMOST)\n");
1795 ok(
ret,
"DestroyWindow(hwnd1)\n");
1797 hwnd2 =
CreateWindowExA(
WS_EX_TOPMOST,
"#32770",
"TEST2",
WS_OVERLAPPEDWINDOW, 150, 250, 300, 200, 0, 0,
hinst, 0);
1799 ok(!
ret,
"SetShellWindow(%p) with WS_EX_TOPMOST\n", hwnd2);
1801 hwnd3 =
CreateWindowExA(0,
"#32770",
"TEST3",
WS_OVERLAPPEDWINDOW, 200, 400, 300, 200, 0, 0,
hinst, 0);
1803 hwnd4 =
CreateWindowExA(0,
"#32770",
"TEST4",
WS_OVERLAPPEDWINDOW, 250, 500, 300, 200, 0, 0,
hinst, 0);
1806 ok(nextWnd==hwnd3,
"wrong next window for hwnd4 %p: %p - expected %p\n", hwnd4, nextWnd, hwnd3);
1809 ok(
ret,
"SetShellWindow(hwnd4)\n");
1811 ok(shellWindow==hwnd4,
"wrong shell window: %p - expected %p\n", shellWindow, hwnd4);
1814 ok(nextWnd==0,
"wrong next window for hwnd4: %p - expected 0\n", nextWnd);
1817 ok(
ret,
"SetWindowPos(hwnd4, HWND_TOPMOST)\n");
1820 ok(
ret,
"SetWindowPos(hwnd4, hwnd3\n");
1823 ok(!
ret,
"SetShellWindow(hwnd3)\n");
1825 ok(shellWindow==hwnd4,
"wrong shell window: %p - expected %p\n", shellWindow, hwnd4);
1827 hwnd5 =
CreateWindowExA(0,
"#32770",
"TEST5",
WS_OVERLAPPEDWINDOW, 300, 600, 300, 200, 0, 0,
hinst, 0);
1829 ok(
ret,
"SetWindowPos(hwnd4, hwnd5)\n");
1834 ok(nextWnd==0,
"wrong next window for hwnd4 after SetWindowPos(): %p - expected 0\n", nextWnd);
1849 HWND orig_shell_window;
1853 ok(orig_shell_window !=
NULL,
"default desktop doesn't have a shell window\n");
1865 if (!orig_shell_window)
1866 skip(
"no shell window on default desktop\n");
1868 ok(
GetShellWindow() == orig_shell_window,
"changing shell window on another desktop effected the default\n");
1880 static const WCHAR classW[] = {
'M',
'D',
'I',
'_',
'c',
'h',
'i',
'l',
'd',
'_',
'C',
'l',
'a',
's',
's',
'_',
'1',0};
1881 static const WCHAR titleW[] = {
'M',
'D',
'I',
' ',
'c',
'h',
'i',
'l',
'd',0};
1884 ok(frame_menu !=
NULL,
"Frame window didn't have a menu\n");
1886 mdi_cs.
szClass =
"MDI_child_Class_1";
1896 ok(mdi_child != 0,
"MDI child creation failed\n");
1898 ok(
id == first_id,
"wrong child id %Id\n",
id);
1901 ok(
hwnd == exp_hwnd,
"WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd,
hwnd);
1903 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
1905 mdi_cs.
style = 0x7fffffff;
1907 ok(mdi_child != 0,
"MDI child creation failed\n");
1909 ok(
id == first_id,
"wrong child id %Id\n",
id);
1911 ok(!
hwnd,
"WM_MDIGETACTIVE should return 0, got %p\n",
hwnd);
1913 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
1915 mdi_cs.
style = 0xffffffff;
1919 ok(!mdi_child,
"MDI child with WS_POPUP and with MDIS_ALLCHILDSTYLES should fail\n");
1923 ok(mdi_child != 0,
"MDI child creation failed\n");
1925 ok(
id == first_id,
"wrong child id %Id\n",
id);
1927 ok(!
hwnd,
"WM_MDIGETACTIVE should return 0, got %p\n",
hwnd);
1930 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
1940 ok(mdi_child != 0,
"MDI child creation failed\n");
1942 ok(
id == first_id,
"wrong child id %Id\n",
id);
1945 ok(
hwnd == exp_hwnd,
"WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd,
hwnd);
1948 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
1956 ok(mdi_child != 0,
"MDI child creation failed\n");
1958 ok(
id == first_id,
"wrong child id %Id\n",
id);
1961 ok(
hwnd == exp_hwnd,
"WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd,
hwnd);
1964 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
1972 ok(mdi_child != 0,
"MDI child creation failed\n");
1974 ok(
id == first_id,
"wrong child id %Id\n",
id);
1976 ok(!
hwnd,
"WM_MDIGETACTIVE should return 0, got %p\n",
hwnd);
1979 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
1989 ok(!mdi_child,
"MDI child with WS_POPUP and with MDIS_ALLCHILDSTYLES should fail\n");
1993 ok(mdi_child != 0,
"MDI child creation failed\n");
1995 ok(
id == first_id,
"wrong child id %Id\n",
id);
1997 ok(!
hwnd,
"WM_MDIGETACTIVE should return 0, got %p\n",
hwnd);
2000 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
2011 ok(mdi_child != 0,
"MDI child creation failed\n");
2013 ok(
id == first_id,
"wrong child id %Id\n",
id);
2016 ok(
hwnd == exp_hwnd,
"WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd,
hwnd);
2019 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
2027 ok(mdi_child != 0,
"MDI child creation failed\n");
2029 ok(
id == first_id,
"wrong child id %Id\n",
id);
2032 ok(
hwnd == exp_hwnd,
"WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd,
hwnd);
2035 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
2043 ok(mdi_child != 0,
"MDI child creation failed\n");
2045 ok(
id == first_id,
"wrong child id %Id\n",
id);
2048 ok(
hwnd == exp_hwnd,
"WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd,
hwnd);
2054 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
2062 ok(mdi_child != 0,
"MDI child creation failed\n");
2064 ok(
id == first_id,
"wrong child id %Id\n",
id);
2066 ok(!
hwnd,
"WM_MDIGETACTIVE should return 0, got %p\n",
hwnd);
2069 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
2079 ok(!mdi_child,
"MDI child with WS_POPUP and with MDIS_ALLCHILDSTYLES should fail\n");
2083 ok(mdi_child != 0,
"MDI child creation failed\n");
2085 ok(
id == first_id,
"wrong child id %Id\n",
id);
2087 ok(!
hwnd,
"WM_MDIGETACTIVE should return 0, got %p\n",
hwnd);
2090 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
2101 ok(mdi_child != 0,
"MDI child creation failed\n");
2103 ok(
id == first_id,
"wrong child id %Id\n",
id);
2106 ok(
hwnd == exp_hwnd,
"WM_MDIGETACTIVE should return %p, got %p\n", exp_hwnd,
hwnd);
2109 ok(!
IsWindow(mdi_child),
"WM_MDIDESTROY failed\n");
2117 ok(!mdi_child,
"WS_EX_MDICHILD with a not MDIClient parent should fail\n");
2125 ok(mdi_child != 0,
"MDI child creation failed\n");
2127 ok(
id == 0,
"wrong child id %Id\n",
id);
2130 ok(!
hwnd,
"WM_MDIGETACTIVE should return 0, got %p\n",
hwnd);
2139 ok(mdi_child != 0,
"MDI child creation failed\n");
2141 ok(
id == 0,
"wrong child id %Id\n",
id);
2143 ok(!
hwnd,
"WM_MDIGETACTIVE should return 0, got %p\n",
hwnd);
2154 ok(mdi_child != 0,
"MDI child creation failed\n");
2156 ok(
id == 0,
"wrong child id %Id\n",
id);
2158 ok(!
hwnd,
"WM_MDIGETACTIVE should return 0, got %p\n",
hwnd);
2168 ok(mdi_child != 0,
"MDI child creation failed\n");
2170 ok(
id == 0,
"wrong child id %Id\n",
id);
2172 ok(!
hwnd,
"WM_MDIGETACTIVE should return 0, got %p\n",
hwnd);
2182 ok(mdi_child != 0,
"MDI child creation failed\n");
2184 ok(
id == 0,
"wrong child id %Id\n",
id);
2186 ok(!
hwnd,
"WM_MDIGETACTIVE should return 0, got %p\n",
hwnd);
2193 HWND child_1, child_2, child_3, child_4;
2197 cs.szClass =
"MDI_child_Class_1";
2198 cs.szTitle =
"MDI child";
2208 ok(child_1 != 0,
"expected child_1 to be non NULL\n");
2210 ok(child_2 != 0,
"expected child_2 to be non NULL\n");
2212 ok(child_3 != 0,
"expected child_3 to be non NULL\n");
2214 ok(child_4 != 0,
"expected child_4 to be non NULL\n");
2222 "Unexpected initial order, should be: %p->%p->%p->%p\n",
2223 child_4, child_3, child_2, child_1);
2233 "Broken MDI child stack:\nexpected: %p->%p->%p->%p, but got: %p->%p->%p->%p\n",
2244 "Broken MDI child stack:\nexpected: %p->%p->%p->%p, but got: %p->%p->%p->%p\n",
2296 ok(!
lstrcmpA(
cs->lpszClass,
"MDI_child_Class_1"),
"wrong class name\n");
2298 ok(!
lstrcmpA(
cs->lpszName,
"MDI child"),
"wrong title\n");
2304 "mdi_cs->style does not match (%08lx)\n", mdi_cs->
style);
2318 ok(!(
cs->style &
WS_POPUP),
"WS_POPUP is not allowed\n");
2324 "cs->style does not match (%08lx)\n",
cs->style);
2333 "cs->style does not match (%08lx)\n",
cs->style);
2353 style &= ~WS_BORDER;
2370 trace(
"DefMDIChildProc returned:\n");
2408 trace(
"%s: x %d, y %d, cx %d, cy %d\n", (
msg ==
WM_NCCREATE) ?
"WM_NCCREATE" :
"WM_CREATE",
2414 ok(!
lstrcmpA(
cs->lpszClass,
"MDI_child_Class_2"),
"wrong class name\n");
2415 ok(!
lstrcmpA(
cs->lpszName,
"MDI child"),
"wrong title\n");
2422 ok(
cs->cx == 0,
"%d != 0\n",
cs->cx);
2423 ok(
cs->cy == 0,
"%d != 0\n",
cs->cy);
2445 style &= ~WS_BORDER;
2465 ok(
EqualRect(&rc1, &
rc2),
"rects do not match, window=%s pos=%s\n",
2472 ok(
EqualRect(&rc1, &
rc2),
"rects do not match, window=%s client=%s\n",
2482 trace(
"%s: %p after %p, x %d, y %d, cx %d, cy %d flags %08x\n",
2485 winpos->
x, winpos->
y, winpos->
cx, winpos->
cy, winpos->
flags);
2490 "DefWindowProc should not change WINDOWPOS: %p after %p, x %d, y %d, cx %d, cy %d flags %08x\n",
2492 winpos->
x, winpos->
y, winpos->
cx, winpos->
cy, winpos->
flags);
2542 trace(
"%s: %p after %p, x %d, y %d, cx %d, cy %d flags %08x\n",
2545 winpos->
x, winpos->
y, winpos->
cx, winpos->
cy, winpos->
flags);
2550 trace(
"%p after %p, x %d, y %d, cx %d, cy %d flags %08x\n",
2552 winpos->
x, winpos->
y, winpos->
cx, winpos->
cy, winpos->
flags);
2555 "DefWindowProc should not change WINDOWPOS values\n");
2609 HMENU frame_menu, child_menu;
2613 mdi_hwndMain =
CreateWindowExA(0,
"MDI_parent_Class",
"MDI parent window",
2637 mdi_hwndMain, 0, 0, &client_cs);
2646 ok(mdi_child != 0,
"MDI child creation failed\n");
2649 SetMenu(mdi_hwndMain, frame_menu);
2651 ok(
GetMenuItemCount(frame_menu) == 0,
"Frame menu should be empty after child maximize, but has %u\n",
2657 ok(
GetMenuItemCount(frame_menu) == 0,
"Frame menu should be empty after WM_MDISETMENU, but has %u\n",
2662 ok(
GetMenuItemCount(frame_menu) == 0,
"Frame menu should be empty after child restored, but has %u items\n",
2667 si.cbSize =
sizeof(
si);
2672 ok(
ret,
"GetScrollInfo(SB_HORZ) failed\n");
2673 ok(
si.nPage == 0,
"expected 0\n");
2674 ok(
si.nPos == 0,
"expected 0\n");
2675 ok(
si.nTrackPos == 0,
"expected 0\n");
2676 ok(
si.nMin == 0,
"expected 0\n");
2677 ok(
si.nMax == 100,
"expected 100\n");
2680 ok(!
ret,
"GetScrollInfo(SB_HORZ) should fail\n");
2685 ok(
ret,
"GetScrollInfo(SB_VERT) failed\n");
2686 ok(
si.nPage == 0,
"expected 0\n");
2687 ok(
si.nPos == 0,
"expected 0\n");
2688 ok(
si.nTrackPos == 0,
"expected 0\n");
2689 ok(
si.nMin == 0,
"expected 0\n");
2690 ok(
si.nMax == 100,
"expected 100\n");
2693 ok(!
ret,
"GetScrollInfo(SB_VERT) should fail\n");
2697 si.cbSize =
sizeof(
si);
2702 ok(
ret,
"GetScrollInfo(SB_HORZ) failed\n");
2703 ok(
si.nPage == 0,
"expected 0\n");
2704 ok(
si.nPos == 0,
"expected 0\n");
2705 ok(
si.nTrackPos == 0,
"expected 0\n");
2706 ok(
si.nMin == 0,
"expected 0\n");
2707 ok(
si.nMax == 100,
"expected 100\n");
2710 ok(!
ret,
"GetScrollInfo(SB_HORZ) should fail\n");
2715 ok(
ret,
"GetScrollInfo(SB_VERT) failed\n");
2716 ok(
si.nPage == 0,
"expected 0\n");
2717 ok(
si.nPos == 0,
"expected 0\n");
2718 ok(
si.nTrackPos == 0,
"expected 0\n");
2719 ok(
si.nMin == 0,
"expected 0\n");
2720 ok(
si.nMax == 100,
"expected 100\n");
2723 ok(!
ret,
"GetScrollInfo(SB_VERT) should fail\n");
2734 if (
msg.message == 0x003f)
2736 ok(
msg.hwnd ==
mdi_client,
"message 0x003f should be posted to mdiclient\n");
2740 ok(
msg.hwnd !=
mdi_client,
"message %04x should not be posted to mdiclient\n",
msg.message);
2743 ok(gotit,
"message 0x003f should appear after SetWindowPos\n");
2745 si.cbSize =
sizeof(
si);
2750 ok(
ret,
"GetScrollInfo(SB_HORZ) failed\n");
2752 ok(
si.nPage != 0,
"expected !0\n");
2753 ok(
si.nPos == 0,
"expected 0\n");
2754 ok(
si.nTrackPos == 0,
"expected 0\n");
2755 ok(
si.nMin != 0,
"expected !0\n");
2756 ok(
si.nMax != 100,
"expected !100\n");
2759 ok(!
ret,
"GetScrollInfo(SB_HORZ) should fail\n");
2764 ok(
ret,
"GetScrollInfo(SB_VERT) failed\n");
2766 ok(
si.nPage != 0,
"expected !0\n");
2767 ok(
si.nPos == 0,
"expected 0\n");
2768 ok(
si.nTrackPos == 0,
"expected 0\n");
2769 ok(
si.nMin != 0,
"expected !0\n");
2770 ok(
si.nMax != 100,
"expected !100\n");
2773 ok(!
ret,
"GetScrollInfo(SB_VERT) should fail\n");
2781 SetMenu(mdi_hwndMain, frame_menu);
2786 mdi_hwndMain, 0, 0, &client_cs);
2795 ok(mdi_child != 0,
"MDI child creation failed\n");
2798 ok(
GetMenuItemCount(frame_menu) == 4,
"Frame menu should have 4 items after child maximize, but has %u\n",
2804 ok(
GetMenuItemCount(frame_menu) == 4,
"Frame menu should have 4 items after WM_MDISETMENU, but has %u\n",
2809 ok(
GetMenuItemCount(frame_menu) == 0,
"Frame menu should be empty after child restored, but has %u items\n",
2860#define check_icon_size(a, b, c) check_icon_size_(__LINE__, a, b, c)
2875#define check_internal_icon_size(a, b, c, d) check_internal_icon_size_(__LINE__, a, b, c, d)
2881 icon = pInternalGetWindowIcon(
window,
type );
2882 ok_(__FILE__,
line)(icon != 0,
"expected nonzero icon\n");
2894 ok( icon != 0,
"expected nonzero icon\n" );
2919 skip(
"test_icons() crashes on Windows Server 2003 and ReactOS.\n");
2931 ok(
hwnd !=
NULL,
"failed to create window\n" );
2934 ok(
res == 0,
"wrong big icon %p/0\n",
res );
2937 ok(
res != 0,
"expected nonzero icon\n" );
2941 ok( res2 && res2 !=
res,
"got %p\n", res2 );
2949 ok( !
res,
"wrong small icon %p\n",
res );
2951 ok(
res != 0,
"expected nonzero icon\n" );
2954 ok( res2 && res2 !=
res,
"got %p\n", res2 );
2962 ok( !
res,
"wrong small2 icon %p\n",
res );
2963 res = pInternalGetWindowIcon(
hwnd, ICON_SMALL2 );
2964 ok(
res != 0,
"expected nonzero icon\n" );
2966 res2 = pInternalGetWindowIcon(
hwnd, ICON_SMALL2 );
2967 ok( res2 && res2 !=
res,
"got %p\n", res2 );
2975 ok(
res == 0,
"wrong previous big icon %p/0\n",
res );
2977 ok(
res == icon,
"wrong big icon after set %p/%p\n",
res, icon );
2979 ok( res2 && res2 != icon,
"got %p\n", res2 );
2985 ok(
res == icon,
"wrong previous big icon %p/%p\n",
res, icon );
2987 ok(
res == icon2,
"wrong big icon after set %p/%p\n",
res, icon2 );
2989 ok( res2 && res2 != icon2,
"got %p\n", res2 );
2995 ok(
res == 0,
"wrong small icon %p/0\n",
res );
2997 ok( res2 != 0,
"expected nonzero icon\n" );
3003 ok(
res &&
res != icon3 &&
res != icon2,
"wrong small2 icon %p\n",
res );
3005 ok( res2 ==
res,
"expected icon to match\n" );
3007 res2 = pInternalGetWindowIcon(
hwnd, ICON_SMALL2 );
3008 ok( res2 && res2 != icon3 && res2 != icon2 && res2 !=
res,
"got %p\n", res2 );
3014 ok(
res == 0,
"wrong previous small icon %p/0\n",
res );
3016 ok(
res == icon,
"wrong small icon after set %p/%p\n",
res, icon );
3018 ok( res2 && res2 != icon,
"got %p\n", res2 );
3024 ok(
res == icon,
"wrong small2 icon after set %p/%p\n",
res, icon );
3025 res2 = pInternalGetWindowIcon(
hwnd, ICON_SMALL2 );
3026 ok( res2 && res2 != icon && res2 !=
res,
"got %p\n", res2 );
3032 ok(
res == icon,
"wrong previous small icon %p/%p\n",
res, icon );
3034 ok(
res == icon3,
"wrong small icon after set %p/%p\n",
res, icon3 );
3036 ok( res2 && res2 != icon3,
"got %p\n", res2 );
3042 ok(
res == icon3,
"wrong small2 icon after set %p/%p\n",
res, icon3 );
3043 res2 = pInternalGetWindowIcon(
hwnd, ICON_SMALL2 );
3044 ok( res2 && res2 != icon3 && res2 !=
res,
"got %p\n", res2 );
3051 ok(
res == icon2,
"wrong big icon after set %p/%p\n",
res, icon2 );
3053 ok( res2 && res2 != icon2,
"got %p\n", res2 );
3064 res = pInternalGetWindowIcon(
hwnd, 0xdeadbeef );
3070 ok( !
ret,
"wait timed out\n" );
3084 ok(
hwnd !=
NULL,
"failed to create window\n" );
3100 ok(
hwnd !=
NULL,
"failed to create window\n" );
3116 ok(
hwnd !=
NULL,
"failed to create window\n" );
3149 HWND hwnd_grandchild, hwnd_child, hwnd_child2;
3210 ok(!!hwnd_desktop,
"Failed to get hwnd_desktop window (%ld).\n",
GetLastError());
3212 ok(!!hwnd_child,
"Failed to create child window (%ld)\n",
GetLastError());
3214 ok(!!hwnd_child,
"Failed to create child window (%ld)\n",
GetLastError());
3216 ok(!!hwnd_child2,
"Failed to create second child window (%ld)\n",
GetLastError());
3262 rc_expected.
top = rc1.
top + 2;
3354 ok(!!hwnd_child,
"Failed to create child window (%ld)\n",
GetLastError());
3372 ok(
SetMenu(
parent, hMenu),
"SetMenu on a top level window should not fail\n");
3379 ok(
ret == hMenu,
"unexpected menu id %p\n",
ret);
3384 ok(!retok,
"menu handle should be not valid after DestroyMenu\n");
3386 ok(
ret == hMenu,
"unexpected menu id %p\n",
ret);
3387 ok(
SetMenu(
parent, 0),
"SetMenu(0) on a top level window should not fail\n");
3395 ok(
ret == 0,
"unexpected menu id %p\n",
ret);
3400 ok(
ret == 0,
"unexpected menu id %p\n",
ret);
3402 ok(
SetMenu(
parent, hMenu),
"SetMenu on a top level window should not fail\n");
3409 ok(
ret == hMenu,
"unexpected menu id %p\n",
ret);
3411 ok(
SetMenu(
parent, 0),
"SetMenu(0) on a top level window should not fail\n");
3414 ok(
ret == 0,
"unexpected menu id %p\n",
ret);
3417 child =
CreateWindowExA(0,
"static",
NULL,
WS_CHILD, 0, 0, 0, 0,
parent, (
HMENU)10, 0,
NULL);
3428 ok(!
SetMenu(
child, hMenu),
"SetMenu on a child window should fail\n");
3433 ok(!
SetMenu(
child, 0),
"SetMenu(0) on a child window should fail\n");
3440 ok(
SetMenu(
child, hMenu),
"SetMenu on a popup child window should not fail\n");
3441 ok(
SetMenu(
child, 0),
"SetMenu on a popup child window should not fail\n");
3445 ok(!
SetMenu(
child, hMenu),
"SetMenu on an overlapped child window should fail\n");
3460 ok(!
hwnd,
"have to start without children to perform the test\n");
3476 ok(
child[
i] != 0,
"CreateWindowEx failed to create child window\n");
3480 ok(
hwnd != 0,
"GetWindow(GW_CHILD) failed\n");
3498 const int simple_order[5] = { 0, 1, 2, 3, 4 };
3503 const int complex_order_1[1] = { 0 };
3504 const int complex_order_2[2] = { 1, 0 };
3505 const int complex_order_3[3] = { 1, 0, 2 };
3506 const int complex_order_4[4] = { 1, 0, 2, 3 };
3507 const int complex_order_5[5] = { 4, 1, 0, 2, 3 };
3511 const int complex_order_6[3] = { 0, 1, 2 };
3527#define check_z_order(hwnd, next, prev, owner, topmost) \
3528 check_z_order_debug((hwnd), (next), (prev), (owner), (topmost), \
3564 hwnd, topmost ?
"" :
"NOT ");
3569 HWND hwnd_A, hwnd_B, hwnd_C, hwnd_F;
3574 skip(
"SetForegroundWindow not working\n");
3625 trace(
"A %p B %p C %p D %p E %p F %p\n", hwnd_A, hwnd_B, hwnd_C, hwnd_D, hwnd_E, hwnd_F);
3668 RECT win_rect, rgn_rect;
3678 win_rect.
top <= rgn_rect.
top &&
3690 ok(
child != 0,
"couldn't find child window\n");
3715 child =
CreateWindowExA(0,
"static",
NULL,
WS_CHILD, 0, 0, 0, 0,
hwnd, 0, 0,
NULL);
3727 child2 =
CreateWindowExA(0,
"static",
NULL,
WS_CHILD, 0, 0, 0, 0,
child, 0, 0,
NULL);
3783 ok(
ret == 0,
"SetFocus %p should fail\n", child2);
3787 ok(
ret == 0,
"SetFocus %p should fail\n",
child);
3793 ok(
GetFocus() == child2,
"Focus should be on child2 %p\n", child2 );
3817 hwnd =
CreateWindowExA( 0,
"static",
NULL,
WS_OVERLAPPEDWINDOW |
WS_VISIBLE, 100, 100, 200, 200, 0, 0,
NULL,
NULL );
3825 ok( tmp ==
hwnd,
"GetForegroundWindow returned %p\n", tmp );
3827 ok( tmp ==
hwnd,
"GetActiveWindow returned %p\n", tmp );
3829 ok( tmp ==
hwnd,
"GetFocus returned %p\n", tmp );
3836 ok( tmp ==
hwnd,
"SetActiveWindow returned %p\n", tmp );
3840 ok( tmp ==
other || tmp == 0,
"GetForegroundWindow returned %p\n", tmp );
3842 ok( tmp == 0,
"GetActiveWindow returned %p\n", tmp );
3844 ok( tmp == 0,
"GetFocus returned %p\n", tmp );
3851 ok( tmp ==
other,
"GetForegroundWindow returned %p\n", tmp );
3853 ok( tmp == 0,
"GetActiveWindow returned %p\n", tmp );
3855 ok( tmp == 0,
"GetFocus returned %p\n", tmp );
3859 ok( tmp == 0,
"SetActiveWindow returned %p\n", tmp );
3862 ok( tmp ==
hwnd,
"GetForegroundWindow returned %p\n", tmp );
3865 ok( tmp ==
hwnd,
"GetActiveWindow returned %p\n", tmp );
3868 ok( tmp ==
hwnd,
"GetFocus returned %p\n", tmp );
3884 hwnd =
CreateWindowExA( 0,
"static",
NULL,
WS_OVERLAPPEDWINDOW |
WS_VISIBLE, 100, 100, 200, 200, 0, 0,
NULL,
NULL );
3891 ok( tmp ==
hwnd,
"GetForegroundWindow returned %p\n", tmp );
3894 ok( tmp ==
hwnd,
"GetActiveWindow returned %p\n", tmp );
3897 ok( tmp ==
hwnd,
"GetFocus returned %p\n", tmp );
3913 ok( tmp ==
hwnd,
"GetForegroundWindow returned %p\n", tmp );
3916 ok( tmp ==
hwnd,
"GetActiveWindow returned %p\n", tmp );
3919 ok( tmp ==
hwnd,
"GetFocus returned %p\n", tmp );
3959 hwnd2 =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP|
WS_VISIBLE, 0, 0, 0, 0,
hwnd, 0, 0,
NULL);
3968 hwnd2 =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP|
WS_VISIBLE, 0, 0, 0, 0,
hwnd, 0, 0,
NULL);
3986 hwnd2 =
CreateWindowExA(0,
"MainWindowClass",
"Child window",
WS_CHILD, 0, 0, 0, 0,
hwnd, 0,
GetModuleHandleA(
NULL),
NULL);
4008 p->window =
CreateWindowA(
"static",
NULL,
WS_POPUP |
WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0);
4040 skip(
"SetForegroundWindow not working\n" );
4047 ok(!
ret,
"SetForegroundWindow returned TRUE instead of FALSE\n");
4049 "got error %ld expected ERROR_INVALID_WINDOW_HANDLE\n",
GetLastError());
4059 ok(hwnd2 ==
hwnd,
"Wrong foreground window %p\n", hwnd2);
4063 ok(hwnd2 !=
hwnd,
"Wrong foreground window %p\n", hwnd2);
4070 ok(
ret,
"SetForegroundWindow returned FALSE instead of TRUE\n");
4076 hwnd2 =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP|
WS_VISIBLE, 0, 0, 0, 0,
hwnd, 0, 0,
NULL);
4082 hwnd2 =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP|
WS_VISIBLE, 0, 0, 0, 0,
hwnd, 0, 0,
NULL);
4091 hwnd2 =
CreateWindowA(
"static",
NULL,
WS_POPUP |
WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0);
4154 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP, 0, 0, 10, 10, 0, 0, 0,
NULL);
4165 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP, 0, 0, 10, 10, 0, 0, 0,
NULL);
4180 ok(capture == 0,
"SetCapture() = %p\n", capture);
4197 ok(capture == 0,
"GetCapture() = %p\n", capture);
4199 button =
CreateWindowExA(0,
"button",
NULL,
WS_POPUP |
WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0,
NULL);
4207 ok(capture == 0,
"SetCapture() = %p\n", capture);
4224 button =
CreateWindowExA(0,
"button",
NULL,
WS_POPUP |
WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0,
NULL);
4230 ok(capture == 0,
"SetCapture() = %p\n", capture);
4240 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP, 0, 0, 10, 10, 0, 0, 0,
NULL);
4251 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP, 0, 0, 10, 10, 0, 0, 0,
NULL);
4261 ok(capture ==
button,
"SetCapture() = %p\n", capture);
4292 ok (
ret,
"releasecapture did not return TRUE.\n");
4294 ok (
ret,
"releasecapture did not return TRUE after second try.\n");
4300 HWND cap_wnd, cap_wnd2, set_cap_wnd;
4307 if (pGetGUIThreadInfo)
4312 ok(
status,
"GetGUIThreadInfo() failed!\n");
4317 ok(cap_wnd == (
HWND)
lParam,
"capture window %p does not match lparam %Ix\n", cap_wnd,
lParam);
4318 todo_wine ok(cap_wnd ==
hWnd,
"capture window %p does not match hwnd %p\n", cap_wnd,
hWnd);
4322 ok(!set_cap_wnd,
"SetCapture should have failed!\n");
4331 ok(!set_cap_wnd,
"SetCapture should have failed!\n");
4335 ok(!
status,
"ReleaseCapture should have failed!\n");
4338 if (pGetGUIThreadInfo)
4343 ok(
status,
"GetGUIThreadInfo() failed!\n");
4349 ok(cap_wnd2 == cap_wnd,
"Capture changed!\n");
4371 if (!pGetGUIThreadInfo)
4373 win_skip(
"GetGUIThreadInfo is not available\n");
4387 ok( aclass,
"RegisterClassA failed with error %ld\n",
GetLastError());
4396 ok(
ret,
"AppendMenuA has failed!\n");
4403 ok(
ret == 0,
"TrackPopupMenu returned %d expected zero\n",
ret);
4440 ok(
ret,
"no message available\n");
4443 ok( !
ret,
"message %04x available\n",
msg.message);
4449 ok(
ret,
"no message available\n");
4452 ok( !
ret,
"message %04x available\n",
msg.message);
4459 skip(
"keybd_event didn't work, skipping keyboard test\n" );
4464 ok( !
ret,
"message %04x available\n",
msg.message);
4473 ok(
ret,
"no message available\n");
4476 ok( !
ret,
"message %04x available\n",
msg.message);
4482 ok(
ret,
"no message available\n");
4485 ok( !
ret,
"message %04x available\n",
msg.message);
4491 ok(
ret,
"no message available\n");
4494 ok( !
ret,
"message %04x available\n",
msg.message);
4511 if (!
ret)
msg->message = 0;
4545 if (
x !=
pt.x ||
y !=
pt.y)
4547 skip(
"failed to set mouse position, skipping mouse input tests\n" );
4561 ok(
msg.pt.x ==
x &&
msg.pt.y ==
y,
"wrong message coords (%d,%d)/(%ld,%ld)\n",
4579 "hwnd %p message %04x\n",
msg.hwnd,
msg.message);
4583 ok( !
ret,
"message %04x available\n",
msg.message);
4595 ok( !
ret,
"message %04x available\n",
msg.message);
4615 skip(
"simulating mouse click doesn't work, skipping mouse button tests\n" );
4621 ok(
ret,
"no message available\n");
4625 msg.hwnd, popup,
msg.message);
4628 ok(
ret,
"no message available\n");
4630 msg.hwnd, popup,
msg.message);
4633 ok(
ret,
"no message available\n");
4635 msg.hwnd, popup,
msg.message);
4638 ok(
ret,
"no message available\n");
4640 msg.hwnd, popup,
msg.message);
4643 ok(!
ret,
"message %04x available\n",
msg.message);
4654 ok(
ret,
"no message available\n");
4658 ok(
ret,
"no message available\n");
4667 ok(
ret,
"no message available\n");
4669 msg.hwnd, popup,
msg.message);
4672 msg.hwnd, popup,
msg.message);
4697 ok(
ret,
"no message available\n");
4702 ok(
ret,
"no message available\n");
4709 ok(
ret,
"no message available\n");
4716 ok(
ret,
"no message available\n");
4722 ok(
ret,
"no message available\n");
4725 "hwnd %p/%p message %04x\n",
msg.hwnd,
child,
msg.message);
4729 ok(
ret,
"no message available\n");
4734 ok(!
ret,
"message %04x available\n",
msg.message);
4751 child =
CreateWindowExA(0,
"static",
NULL,
WS_CHILD|
WS_VISIBLE, 10, 10, 10, 10,
hwnd, 0, 0,
NULL);
4759 ok(
ret == 1,
"Expected GetUpdateRect to return non-zero, got %d\n",
ret);
4761 "Update rectangle is empty!\n");
4764 ok( !
ret,
"Expected GetUpdateRect to return zero, got %d\n",
ret);
4765 ok(
rc2.left == 0 &&
rc2.top == 0 &&
rc2.right == 0 &&
rc2.bottom == 0,
4775 ok( !
ret,
"Expected GetUpdateRect to return zero, got %d\n",
ret);
4776 ok(
rc2.left == 0 &&
rc2.top == 0 &&
rc2.right == 0 &&
rc2.bottom == 0,
4809 ok( rc1.
bottom - rc1.
top == sbheight,
"Height should be %d size is %s\n", sbheight,
4818 ok( rc1.
right - rc1.
left == sbwidth - 1 ,
"Width should be %d size is %s\n", sbwidth - 1,
4839 HWND ret,
parent, child1, child2, child3, child4, sibling, popup;
4843 100, 100, 200, 200, 0, 0, 0,
NULL);
4849 0, 0, 50, 50, child1, 0, 0,
NULL);
4852 0, 0, 50, 50, child2, 0, 0,
NULL);
4855 0, 0, 50, 50, child3, 0, 0,
NULL);
4858 trace(
"parent %p, child1 %p, child2 %p, child3 %p, child4 %p\n",
4859 parent, child1, child2, child3, child4);
4868 ok(!
IsChild(desktop, child1),
"wrong parent/child %p/%p\n", desktop, child1);
4869 ok(!
IsChild(desktop, child2),
"wrong parent/child %p/%p\n", desktop, child2);
4870 ok(!
IsChild(desktop, child3),
"wrong parent/child %p/%p\n", desktop, child3);
4871 ok(!
IsChild(desktop, child4),
"wrong parent/child %p/%p\n", desktop, child4);
4874 ok(!
IsChild(desktop, child2),
"wrong parent/child %p/%p\n", desktop, child2);
4876 ok(!
IsChild(child1, child2),
"wrong parent/child %p/%p\n", child1, child2);
4878 ok(
IsChild(child2, child3),
"wrong parent/child %p/%p\n", child2, child3);
4880 ok(!
IsChild(child3, child4),
"wrong parent/child %p/%p\n", child3, child4);
4881 ok(!
IsChild(desktop, child4),
"wrong parent/child %p/%p\n", desktop, child4);
4884 ok(!
SetParent(child2, child3),
"SetParent should fail\n");
4891 ok(
ret != 0,
"SetParent should not fail\n");
4893 ok(!
ret,
"SetParent should fail\n");
4895 ok(
ret != 0,
"SetParent should not fail\n");
4905 ok(
ret != 0,
"SetParent should not fail\n");
4907 ok(!
ret,
"SetParent should fail\n");
4909 ok(!
ret,
"SetParent should fail\n");
4919 100, 100, 200, 200, 0, hMenu, 0,
NULL);
4923 ok(
GetMenu(sibling) == hMenu,
"SetParent should not remove menu\n");
4926 ok(
SetParent(child4, child3) != 0,
"SetParent should not fail\n");
4927 ok(
SetParent(child3, child2) != 0,
"SetParent should not fail\n");
4928 ok(
SetParent(child2, child1) != 0,
"SetParent should not fail\n");
4929 ok(!
IsChild(child3, child4),
"wrong parent/child %p/%p\n", child3, child4);
4931 ok(
IsChild(child3, child4),
"wrong parent/child %p/%p\n", child3, child4);
4932 ok(
IsChild(child2, child4),
"wrong parent/child %p/%p\n", child2, child4);
4933 ok(!
IsChild(child1, child4),
"wrong parent/child %p/%p\n", child1, child4);
4935 ok(
IsChild(child1, child4),
"wrong parent/child %p/%p\n", child1, child4);
4941 ok(!
IsWindow(sibling),
"sibling still exists\n");
4942 ok(!
IsWindow(child1),
"child1 still exists\n");
4943 ok(!
IsWindow(child2),
"child2 still exists\n");
4944 ok(!
IsWindow(child3),
"child3 still exists\n");
4945 ok(!
IsWindow(child4),
"child4 still exists\n");
4948 100, 100, 200, 200, 0, 0, 0,
NULL);
4954 0, 0, 50, 50, 0, 0, 0,
NULL);
4957 trace(
"parent %p, child %p, popup %p\n",
parent, child1, popup);
4968 ok(
ret == desktop,
"expected %p, got %p\n", desktop,
ret);
4996 ok(bret,
"SetForegroundWindow() failed\n");
5007 ok(!
IsWindow(child1),
"child1 still exists\n");
5008 ok(!
IsWindow(popup),
"popup still exists\n");
5029 ts =
c->lpcs->lpCreateParams;
5030 ok(ts !=
NULL,
"lpCreateParams not set\n");
5031 ok(
c->lpcs->style == ts->
cs_style,
"style = 0x%08lx, expected 0x%08lx\n",
5033 ok(
c->lpcs->dwExStyle == ts->
cs_exstyle,
"exstyle = 0x%08lx, expected 0x%08lx\n",
5056 ts =
cs->lpCreateParams;
5058 ok(ts !=
NULL,
"lpCreateParams not set\n");
5059 ok(
cs->style == ts->
cs_style,
"style = 0x%08lx, expected 0x%08lx\n",
5061 ok(
cs->dwExStyle == ts->
cs_exstyle,
"exstyle = 0x%08lx, expected 0x%08lx\n",
5065 ok(
style == ts->
style,
"style = 0x%08lx, expected 0x%08lx\n",
5068 ok(
style == ts->
exstyle,
"exstyle = 0x%08lx, expected 0x%08lx\n",
5099 DWORD dwActualStyle;
5100 DWORD dwActualExStyle;
5114 ts.
style = dwStyleOut;
5127 ok(
hwnd !=
NULL,
"CreateWindowExA failed\n");
5134 ok(dwActualStyle == dwStyleOut,
"expected style %#lx, got %#lx\n", dwStyleOut, dwActualStyle);
5135 ok(dwActualExStyle == dwExStyleOut,
"expected ex_style %#lx, got %#lx\n", dwExStyleOut, dwActualExStyle);
5147 dwExStyleOut = dwExStyleIn & ~WS_EX_WINDOWEDGE;
5148 ok(dwActualStyle == dwStyleOut,
"expected style %#lx, got %#lx\n", dwStyleOut, dwActualStyle);
5149 ok(dwActualExStyle == dwExStyleOut,
"expected ex_style %#lx, got %#lx\n", dwExStyleOut, dwActualExStyle);
5163 dwExStyleOut = dwExStyleIn & ~WS_EX_WINDOWEDGE;
5164 ok(dwActualStyle == dwStyleOut,
"expected style %#lx, got %#lx\n", dwStyleOut, dwActualStyle);
5165 ok(dwActualExStyle == dwExStyleOut,
"expected ex_style %#lx, got %#lx\n", dwExStyleOut, dwActualExStyle);
5259 BOOL parent_is_child;
5265 if (parent_is_child)
5268 disabled_hwnd =
param->grand_parent;
5273 disabled_hwnd =
param->parent;
5276 if (
param->grand_parent)
5278 if (parent_is_child)
5289 if (
param->grand_parent)
5295 if (
param->grand_parent)
5330 ok(
parent != 0,
"parent creation failed, style %#lx\n", style_in);
5345 ok(
hwnd != 0,
"dialog creation failed, style %#lx, exstyle %#lx\n", style_in, ex_style_in);
5352 ok(ex_style == ex_style_out,
"expected ex_style %#lx, got %#lx\n", ex_style_out, ex_style);
5367 ex_style_out = ex_style_in & ~WS_EX_WINDOWEDGE;
5368 ok(ex_style == ex_style_out,
"expected ex_style %#lx, got %#lx\n", ex_style_out, ex_style);
5376 ok(
style == style_out,
"expected style %#lx, got %#lx\n", style_out,
style);
5383 ex_style_out = ex_style_in & ~WS_EX_WINDOWEDGE;
5384 ok(ex_style == ex_style_out,
"expected ex_style %#lx, got %#lx\n", ex_style_out, ex_style);
5479 if (pGetLayeredWindowAttributes)
5586 dlg_data.dt.cdit = 0;
5589 dlg_data.dt.cx = 100;
5590 dlg_data.dt.cy = 100;
5591 dlg_data.menu_name = 0;
5592 dlg_data.class_id = 0;
5593 dlg_data.class_atom = 0;
5594 dlg_data.caption[0] = 0;
5596 parent =
CreateWindowExA(0,
"static",
NULL,
WS_OVERLAPPEDWINDOW, 0, 0, 0, 0,
NULL,
NULL,
NULL,
NULL);
5598 child =
CreateWindowExA(0,
"static",
NULL,
WS_OVERLAPPEDWINDOW, 0, 0, 0, 0,
NULL,
NULL,
NULL,
NULL);
5601 child2 =
CreateWindowExA(0,
"static",
NULL,
WS_CHILD, 0, 0, 0, 0,
child,
NULL,
NULL,
NULL);
5608 ok(
dialog != 0,
"dialog creation failed\n");
5624 ok(
ret == 2,
"DialogBoxIndirectParam returned %Id\n",
ret);
5630 ok(
dialog != 0,
"dialog creation failed\n");
5639 param.ga_parent = desktop;
5645 ok(
ret == 2,
"DialogBoxIndirectParam returned %Id\n",
ret);
5647 other =
CreateWindowExA(0,
"static",
NULL,
WS_OVERLAPPEDWINDOW, 0, 0, 0, 0,
NULL,
NULL,
NULL,
NULL);
5654 ok(
dialog != 0,
"dialog creation failed\n");
5663 param.ga_parent = desktop;
5669 ok(
ret == 2,
"DialogBoxIndirectParam returned %Id\n",
ret);
5677 ok(
ret == 2,
"DialogBoxIndirectParam returned %Id\n",
ret);
5689 ok(
ret == 1,
"DialogBoxIndirectParam returned %Id\n",
ret);
5699 ok(
ret == 1,
"DialogBoxIndirectParam returned %Id\n",
ret);
5706 ok(
ret == 1,
"DialogBoxIndirectParam returned %Id\n",
ret);
5741 ok ( colr == 0,
"pixel should be black, color is %08lx\n", colr);
5761 ok ( colr == 0,
"pixel should be black, color is %08lx\n", colr);
5771 HRGN exprgn, tmprgn, clipping;
5772 RECT rc, rcu, cliprc;
5858 SetRect( &cliprc, 0,0, 100,100);
5861 ok(
EqualRgn( exprgn,
hrgn),
"wrong update region in excessive scroll\n");
5869 50, 50, 100, 100, hwnd1, 0, 0,
NULL);
5936 100, 100, 200, 200, 0, 0, 0,
NULL);
5939 ok(
ret,
"GetScrollRange failed\n" );
5940 ok(
min == 0,
"minimum scroll pos is %d (should be zero)\n",
min);
5941 ok(
max == 0,
"maximum scroll pos is %d (should be zero)\n",
min);
5942 si.cbSize =
sizeof(
si);
5944 si.nPage = 0xdeadbeef;
5946 ok( !
ret,
"GetScrollInfo returns %d (should be zero)\n",
ret);
5947 ok(
si.nPage == 0xdeadbeef,
"unexpected value for nPage is %d\n",
si.nPage);
5950 ok(
ret,
"GetScrollRange returns FALSE\n");
5951 ok(
min == 0,
"minimum scroll pos is %d (should be zero)\n",
min);
5952 ok(
max == 0,
"maximum scroll pos is %d (should be zero)\n",
min);
5953 si.cbSize =
sizeof(
si);
5955 si.nPage = 0xdeadbeef;
5957 ok( !
ret,
"GetScrollInfo returns %d (should be zero)\n",
ret);
5958 ok(
si.nPage == 0xdeadbeef,
"unexpected value for nPage is %d\n",
si.nPage);
5966 HRGN exprgn, tmprgn,
hrgn;
5992 ok ( colr == 0,
"pixel should be black, color is %08lx\n", colr);
5996 ok ( colr == 0,
"pixel should be black, color is %08lx\n", colr);
6058 "CreateWindow with invalid menu handle should fail\n");
6074 ok(
hwnd !=
NULL,
"Failed to create window class=%s, style=0x%08lx, exStyle=0x%08lx\n",
class,
style, exStyle);
6098 class.cbClsExtra = 0;
6099 class.cbWndExtra = 0;
6100 class.hInstance = 0;
6103 class.hbrBackground = 0;
6104 class.lpszMenuName = 0;
6108 ok(
FALSE,
"RegisterClass failed\n");
6115 ok(
hmenu != 0,
"Failed to create menu\n");
6124 static const DWORD styles[] = {
6128 static const DWORD exStyles[] = {
6161 for (
k = exstyle = 0;
k <
ARRAY_SIZE(exStyles);
k++)
if (
j & (1 <<
k)) exstyle |= exStyles[
k];
6168 if (pAdjustWindowRectExForDpi)
6181#define SHOWSYSMETRIC(SM) trace(#SM "=%d\n", GetSystemMetrics(SM))
6249 ok(
ret,
"Failed to register a test class.\n");
6293 trace(
"WM_PAINT: hwnd %p, client rect %s, window rect %s\n",
hwnd,
6322#define parentdc_field_ok(t, w, r, f, got) \
6323 ok (t.w.r.f==got.w.r.f, "window " #w ", rect " #r ", field " #f \
6324 ": expected %ld, got %ld\n", \
6327#define parentdc_todo_field_ok(t, w, r, f, got) \
6328 todo_wine_if (t.w##_todo.r.f) \
6329 parentdc_field_ok(t, w, r, f, got);
6331#define parentdc_rect_ok(t, w, r, got) \
6332 parentdc_todo_field_ok(t, w, r, left, got); \
6333 parentdc_todo_field_ok(t, w, r, top, got); \
6334 parentdc_todo_field_ok(t, w, r, right, got); \
6335 parentdc_todo_field_ok(t, w, r, bottom, got);
6337#define parentdc_win_ok(t, w, got) \
6338 parentdc_rect_ok(t, w, client, got); \
6339 parentdc_rect_ok(t, w, clip, got); \
6340 parentdc_rect_ok(t, w, paint, got);
6342#define parentdc_ok(t, got) \
6343 parentdc_win_ok(t, main, got); \
6344 parentdc_win_ok(t, child1, got); \
6345 parentdc_win_ok(t, child2, got);
6356#define nothing_todo {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}
6359 {{0, 0, 150, 150}, {0, 0, 150, 150}, {0, 0, 150, 150}},
nothing_todo,
6360 {{0, 0, 40, 40}, {-20, -20, 130, 130}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}},
6361 {{0, 0, 40, 40}, {-40, -40, 110, 110}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}},
6366 {{0, 0, 166, 150}, {0, 0, 166, 150}, {0, 0, 166, 150}},
nothing_todo,
6367 {{0, 0, 40, 40}, {-20, -20, 146, 130}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}},
6368 {{0, 0, 40, 40}, {-40, -40, 126, 110}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}},
6374 {{0, 0, 150, 150}, {0, 0, 50, 50}, {0, 0, 50, 50}},
nothing_todo,
6375 {{0, 0, 40, 40}, {-20, -20, 30, 30}, {0, 0, 30, 30}}, {{0, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}},
6376 {{0, 0, 40, 40}, {-40, -40, 10, 10}, {0, 0, 10, 10}}, {{0, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}},
6381 {{0, 0, 166, 150}, {0, 0, 50, 50}, {0, 0, 50, 50}},
nothing_todo,
6382 {{0, 0, 40, 40}, {-20, -20, 30, 30}, {0, 0, 30, 30}}, {{0, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}},
6383 {{0, 0, 40, 40}, {-40, -40, 10, 10}, {0, 0, 10, 10}}, {{0, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}},
6389 {{0, 0, 150, 150}, {0, 0, 10, 10}, {0, 0, 10, 10}},
nothing_todo,
6390 {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},
nothing_todo,
6391 {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},
nothing_todo,
6396 {{0, 0, 166, 150}, {0, 0, 10, 10}, {0, 0, 10, 10}},
nothing_todo,
6397 {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},
nothing_todo,
6398 {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},
nothing_todo,
6404 {{0, 0, 150, 150}, {40, 40, 50, 50}, {40, 40, 50, 50}},
nothing_todo,
6405 {{0, 0, 40, 40}, {20, 20, 30, 30}, {20, 20, 30, 30}},
nothing_todo,
6406 {{0, 0, 40, 40}, {0, 0, 10, 10}, {0, 0, 10, 10}},
nothing_todo,
6411 {{0, 0, 166, 150}, {40, 40, 50, 50}, {40, 40, 50, 50}},
nothing_todo,
6412 {{0, 0, 40, 40}, {20, 20, 30, 30}, {20, 20, 30, 30}},
nothing_todo,
6413 {{0, 0, 40, 40}, {0, 0, 10, 10}, {0, 0, 10, 10}},
nothing_todo,
6419 {{0, 0, 150, 150}, {20, 20, 60, 60}, {20, 20, 60, 60}},
nothing_todo,
6420 {{0, 0, 40, 40}, {-20, -20, 130, 130}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}},
6421 {{0, 0, 40, 40}, {-20, -20, 20, 20}, {0, 0, 20, 20}}, {{0, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}},
6426 {{0, 0, 166, 150}, {20, 20, 60, 60}, {20, 20, 60, 60}},
nothing_todo,
6427 {{0, 0, 40, 40}, {-20, -20, 146, 130}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}},
6428 {{0, 0, 40, 40}, {-20, -20, 20, 20}, {0, 0, 20, 20}}, {{0, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}},
6434 {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},
nothing_todo,
6435 {{0, 0, 40, 40}, {0, 0, 10, 10}, {0, 0, 10, 10}},
nothing_todo,
6436 {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},
nothing_todo,
6441 {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},
nothing_todo,
6442 {{0, 0, 40, 40}, {-20, -20, 130, 130}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}},
6443 {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},
nothing_todo,
6448 {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},
nothing_todo,
6449 {{0, 0, 40, 40}, {-20, -20, 146, 130}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}},
6450 {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}},
nothing_todo,
6466 ok(
ret,
"Failed to register a test class.\n");
6479 ok(
ret,
"Failed to register a test class.\n");
6616 static const char ansi_class_nameA[] =
"ansi class name";
6617 static const WCHAR ansi_class_nameW[] = {
'a',
'n',
's',
'i',
' ',
'c',
'l',
'a',
's',
's',
' ',
'n',
'a',
'm',
'e',0};
6618 static const char unicode_class_nameA[] =
"unicode class name";
6619 static const WCHAR unicode_class_nameW[] = {
'u',
'n',
'i',
'c',
'o',
'd',
'e',
' ',
'c',
'l',
'a',
's',
's',
' ',
'n',
'a',
'm',
'e',0};
6628 classW.lpszClassName = unicode_class_nameW;
6631 memset(&classA, 0,
sizeof(classA));
6802 ok(
EqualRect( &
rect,
r ),
"passed rect %s doesn't match window rect %s\n",
6823#define expect_menu(window, menu) \
6824 SetLastError(0xdeadbeef); \
6825 res = (GetMenu(window) == (HMENU)menu); \
6826 ok(res, "GetMenu error %ld\n", GetLastError())
6828#define expect_style(window, style)\
6829 ok((ULONG)GetWindowLongA(window, GWL_STYLE) == (style), "expected style %lx != %lx\n", (LONG)(style), GetWindowLongA(window, GWL_STYLE))
6831#define expect_ex_style(window, ex_style)\
6832 ok((ULONG)GetWindowLongA(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %lx != %lx\n", (LONG)(ex_style), GetWindowLongA(window, GWL_EXSTYLE))
6939 ok(!
hwnd,
"CreateWindowEx should fail\n");
6961 ok(!
hwnd,
"CreateWindowEx should fail\n");
6983 ok(!
hwnd,
"CreateWindowEx should fail\n");
7005 ok(!
hwnd,
"CreateWindowEx should fail\n");
7039 0, 0, 100, 100, 0, 0, 0,
NULL);
7045 memset(&minmax, 0,
sizeof(minmax));
7050 ok(
IsRectEmpty(&rc_minmax),
"ptMaxTrackSize is not empty\n");
7068 memset(&minmax, 0,
sizeof(minmax));
7085 hwnd =
CreateWindowExA(0,
"Sizes_WndClass",
NULL,
WS_CHILD, 300000, 300000, 200000, 200000,
parent, 0, 0,
NULL);
7089 "invalid rect right %lu\n", rc.
right );
7091 "invalid rect bottom %lu\n", rc.
bottom );
7097 hwnd =
CreateWindowExA(0,
"Sizes_WndClass",
NULL,
WS_CHILD, -20, -20, -10, -10,
parent, 0, 0,
NULL);
7100 ok( rc.
right == 0,
"invalid rect right %lu\n", rc.
right );
7107 hwnd =
CreateWindowExA(0,
"Sizes_WndClass",
NULL,
WS_CHILD, -300000, -300000, -200000, -200000,
parent, 0, 0,
NULL);
7110 ok( rc.
right == 0,
"invalid rect right %lu\n", rc.
right );
7116 parent =
CreateWindowExA(0,
"MinMax_WndClass",
NULL,
WS_POPUP, 0, 0, 100, 100, 0, 0, 0,
NULL);
7123 hwnd =
CreateWindowExA(0,
"Sizes_WndClass",
NULL,
WS_CHILD, 10, 10, 100, 0x7fffffff,
parent, 0, 0,
NULL);
7126 ok( rc.
right == 100,
"invalid rect right %lu\n", rc.
right );
7128 "invalid rect bottom %lu\n", rc.
bottom );
7135 hwnd =
CreateWindowExA(0,
"Sizes_WndClass",
NULL,
WS_CHILD, 20, 10, 0x7fffffff, 0x7fffffff,
parent, 0, 0,
NULL);
7139 "invalid rect right %lu\n", rc.
right );
7141 "invalid rect bottom %lu\n", rc.
bottom );
7147 hwnd =
CreateWindowExA(0,
"Sizes_WndClass",
NULL,
WS_OVERLAPPEDWINDOW, 300000, 300000, 200000, 200000, 0, 0, 0,
NULL);
7156 hwnd =
CreateWindowExA(0,
"INVALID_CLASS",
NULL,
WS_CHILD, 10, 10, 100, 100,
parent, 0, 0,
NULL);
7157 ok(
hwnd == 0,
"CreateWindowEx succeeded\n");
7170 0, 0, 100, 100, 0, 0, 0,
NULL);
7173 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_CHILD, 0, 0, 20, 20,
parent, 0, 0,
NULL);
7177 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP, 0, 0, 20, 20,
parent, 0, 0,
NULL);
7182 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_CHILD, 0, 0, 20, 20,
parent, 0, 0,
NULL);
7187 if (pGetProcessDefaultLayout && pSetProcessDefaultLayout)
7192 ok( !pGetProcessDefaultLayout(
NULL ),
"GetProcessDefaultLayout succeeded\n" );
7195 res = pGetProcessDefaultLayout( &
layout );
7197 ok(
layout == 0,
"GetProcessDefaultLayout wrong layout %lx\n",
layout );
7199 res = pSetProcessDefaultLayout( 7 );
7201 res = pGetProcessDefaultLayout( &
layout );
7203 ok(
layout == 7,
"GetProcessDefaultLayout wrong layout %lx\n",
layout );
7207 res = pGetProcessDefaultLayout( &
layout );
7211 0, 0, 100, 100, 0, 0, 0,
NULL);
7220 pSetProcessDefaultLayout( 0 );
7222 else win_skip(
"SetProcessDefaultLayout not supported\n" );
7224 else win_skip(
"SetLayout not supported\n" );
7233#undef expect_ex_style
7240 static int sets_last_error = -1;
7241 if (sets_last_error == -1)
7242 sets_last_error = (actual != 0xdeadbeef);
7243 return (!sets_last_error && (actual == 0xdeadbeef)) || (actual ==
expected);
7257 ok(
hwnd !=
NULL,
"Failed to create test window.\n");
7272 ok(wnd_proc_2 ==
wnd_proc,
"Unexpected window proc.\n");
7281 ok(
ret == 123,
"Unexpected user data %#lx.\n",
ret);
7283 ok(
retval > 123,
"Unexpected user data.\n");
7285 ok(
ret == 123,
"Unexpected user data %#lx.\n",
ret);
7287 ok(
ret == 123,
"Unexpected user data %#lx.\n",
ret);
7289 ok(
ret == 124,
"Unexpected user data %#lx.\n",
ret);
7291 ok(
retval == 124,
"Unexpected user data.\n");
7295 ok(
ret == ((1 << 16) | 123),
"Unexpected user data %#lx.\n",
ret);
7297 ok(
ret == 123,
"Unexpected user data %#lx.\n",
ret);
7300 ok(
ret == 123,
"Unexpected user data %#lx.\n",
ret);
7302 ok(
ret == ((1 << 16) | 124),
"Unexpected user data %#lx.\n",
ret);
7304 ok(
ret == 124,
"Unexpected user data %#lx.\n",
ret);
7308 ok(!
ret,
"Unexpected id %#lx.\n",
ret);
7311 ok(
ret == 1,
"Unexpected id %#lx.\n",
ret);
7314 ok(
ret == 1,
"Unexpected id %#lx.\n",
ret);
7318 ok(
ret == 123,
"Unexpected id %#lx.\n",
ret);
7320 ok(
ret == 123,
"Unexpected id %#lx.\n",
ret);
7322 ok(
retval > 123,
"Unexpected id.\n");
7382 ok(
hwnd !=
NULL,
"Failed to create test window.\n");
7397 ok(wnd_proc_2 ==
wnd_proc,
"Unexpected window proc.\n");
7401 ok(!
ret,
"Unexpected user data %#lx.\n",
ret);
7403 ok(
ret > 123,
"Unexpected user data %#lx.\n",
ret);
7405 ok(
ret == 123,
"Unexpected user data %#lx.\n",
ret);
7407 ok(
ret == 123,
"Unexpected user data %#lx.\n",
ret);
7409 ok(
ret == 124,
"Unexpected user data %#lx.\n",
ret);
7411 ok(
ret == ((1 << 16) | 124),
"Unexpected user data %#lx.\n",
ret);
7415 ok(!
ret,
"Unexpected id %#lx.\n",
ret);
7417 ok(
ret == 1,
"Unexpected id %#lx.\n",
ret);
7440 ok(!!
retval,
"Unexpected parent window %#lx.\n",
ret);
7456 ok(!
retval,
"SetWindowLongPtr on invalid window handle should have returned 0 instead of 0x%Ix\n",
retval);
7458 "SetWindowLongPtr should have set error to ERROR_INVALID_WINDOW_HANDLE instead of %ld\n",
GetLastError());
7462 ok(!
retval,
"SetWindowLongPtr on invalid index should have returned 0 instead of 0x%Ix\n",
retval);
7464 "SetWindowLongPtr should have set error to ERROR_INVALID_INDEX instead of %ld\n",
GetLastError());
7469 "SetWindowLongPtr on invalid window proc should have returned address of main_window_procA instead of 0x%Ix\n",
retval);
7470 ok(
GetLastError() == 0xdeadbeef,
"SetWindowLongPtr shouldn't have set the last error, instead of setting it to %ld\n",
GetLastError());
7473 "SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%Ix\n",
retval);
7481 ok(
GetLastError() == 0xdeadbeef,
"SetWindowLongPtr shouldn't have set the last error, instead of setting it to %ld\n",
GetLastError());
7484 "SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%Ix\n",
retval);
7529 LONG expected_style, new_style, old_style;
7537 LONG creation_style;
7560 memset(&cls, 0,
sizeof(cls));
7568 expected_style =
tests[
i].style;
7575 expected_stylestruct[1].
styleNew = expected_style;
7578 tests[
i].creation_style, 100, 100, 200, 200, 0, 0, 0,
NULL);
7579 ok(
hwnd != 0,
"CreateWindow failed\n");
7583 ok(old_style ==
tests[
i].creation_style,
"expected old style %#lx, got %#lx\n",
7584 tests[
i].creation_style, old_style);
7586 ok(new_style == expected_style,
"expected new style %#lx, got %#lx\n",
7587 expected_style, new_style);
7600 RECT rcMain, rc, rcMinimized, rcClient, rcEmpty, rcMaximized, rcResized, rcNonClient, rcBroken;
7619 SetRect(&rcClient, 0, 0, 90, 90);
7635 mon_info.
cbSize =
sizeof(mon_info);
7637 rcMaximized = mon_info.
rcWork;
7650 ok(
EqualRect(&rcClient, &rc),
"expected %s, got %s\n",
7654 ok(!
ret,
"not expected ret: %Iu\n",
ret);
7664 ok(
EqualRect(&rcClient, &rc),
"expected %s, got %s\n",
7668 ok(
ret,
"not expected ret: %Iu\n",
ret);
7675 ok(
EqualRect(&rcMinimized, &rc),
"expected %s, got %s\n",
7678 ok(
EqualRect(&rcEmpty, &rc),
"expected %s, got %s\n",
7682 (rcMinimized.
right - rcMinimized.
left) * 2,
7683 (rcMinimized.
bottom - rcMinimized.
top) * 2,
7685 ok(
ret,
"not expected ret: %Iu\n",
ret);
7687 ok(
EqualRect(&rcMinimized, &rc),
"expected %s, got %s\n",
7690 ok(
EqualRect(&rcEmpty, &rc),
"expected %s, got %s\n",
7695 ok(
ret,
"not expected ret: %Iu\n",
ret);
7697 ok(
EqualRect(&rcMinimized, &rc),
"expected %s, got %s\n",
7700 ok(
EqualRect(&rcEmpty, &rc),
"expected %s, got %s\n",
7707 ok(
EqualRect(&rc, &rcNonClient),
"expected %s, got %s\n",
7711 ok(
ret,
"not expected ret: %Iu\n",
ret);
7721 ok(
EqualRect(&rcClient, &rc),
"expected %s, got %s\n",
7725 ok(
ret,
"not expected ret: %Iu\n",
ret);
7732 ok(
EqualRect(&rcMaximized, &rc),
"expected %s, got %s\n",
7736 ok(
ret,
"not expected ret: %Iu\n",
ret);
7737 SetRect(&rcResized, 300, 300, 500, 500);
7739 ok(
EqualRect(&rcResized, &rc),
"expected %s, got %s\n",
7743 ok(
ret,
"not expected ret: %Iu\n",
ret);
7754 ok(!
ret,
"not expected ret: %Iu\n",
ret);
7759 ok(!
ret,
"not expected ret: %Iu\n",
ret);
7769 ok(
EqualRect(&rcClient, &rc),
"expected %s, got %s\n",
7773 ok(!
ret,
"not expected ret: %Iu\n",
ret);
7783 ok(
EqualRect(&rcClient, &rc),
"expected %s, got %s\n",
7787 ok(
ret,
"not expected ret: %Iu\n",
ret);
7794 ok(
EqualRect(&rcMinimized, &rc),
"expected %s, got %s\n",
7797 ok(
EqualRect(&rcEmpty, &rc),
"expected %s, got %s\n",
7801 ok(!
ret,
"not expected ret: %Iu\n",
ret);
7808 ok(
EqualRect(&rcMinimized, &rc),
"expected %s, got %s\n",
7811 ok(
EqualRect(&rcEmpty, &rc),
"expected %s, got %s\n",
7815 ok(
ret,
"not expected ret: %Iu\n",
ret);
7825 ok(
EqualRect(&rcClient, &rc),
"expected %s, got %s\n",
7829 ok(!
ret,
"not expected ret: %Iu\n",
ret);
7833 ok(
ret,
"not expected ret: %Iu\n",
ret);
7836 ok(!
ret,
"not expected ret: %Iu\n",
ret);
7850 ok(
EqualRect(&rcMinimized, &rc),
"expected %s, got %s\n",
7853 ok(
EqualRect(&rcEmpty, &rc),
"expected %s, got %s\n",
7867 ok(
EqualRect(&rcMinimized, &rc),
"expected %s, got %s\n",
7870 ok(
EqualRect(&rcEmpty, &rc),
"expected %s, got %s\n",
7880 SetRect(&rcMain, 0, 0, 90, 90);
7893 "Test %u: window should not be fullscreen\n",
i);
7900 ok(
ret,
"unexpected ret: %Iu\n",
ret);
7905 rcBroken = rcMaximized;
7917 ok(
ret,
"unexpected ret: %Iu\n",
ret);
7921 ok(
EqualRect(&rcMain, &rc),
"Test %u: expected %s, got %s\n",
7939 SetRect(&orig, 20, 20, 210, 110);
7949 ok(!!hwnd2,
"failed to create window, error %lu\n",
GetLastError());
8069 SetRect(&orig, 20, 20, 210, 110);
8079 ok(!!hwnd2,
"failed to create window, error %lu\n",
GetLastError());
8204 SetRect(&orig, 20, 20, 210, 110);
8209 ok(!!mdiclient,
"failed to create window, error %lu\n",
GetLastError());
8219 ok(!!hwnd2,
"failed to create window, error %lu\n",
GetLastError());
8386 memset(&cls, 0,
sizeof(cls));
8393 0, 0, 100, 100, 0, 0, 0,
NULL);
8414 ok( buf_len != 0,
"expected a nonempty window text\n" );
8415 ok( !
strcmp(
buf,
"another_caption"),
"got wrong window text '%s'\n",
buf );
8429 ok(
success,
"SetWindowTextA failed\n" );
8437 static const WCHAR textW[] = {
't',
'e',
'x',
't'};
8448 hwnd =
CreateWindowExA( 0,
"MainWindowClass",
"caption",
WS_POPUP, 0, 0, 0, 0, 0, 0, 0,
NULL );
8455 ok( buf_len != 0,
"expected a nonempty window text\n" );
8456 ok( !
strcmp(
buf,
"caption"),
"got wrong window text '%s'\n",
buf );
8462 ok( buf_len == 0,
"expected a nonempty window text\n" );
8463 ok( *
buf == 0,
"got wrong window text '%s'\n",
buf );
8467 ok( buf_len == 0,
"expected a nonempty window text\n" );
8472 ok( buf_len == 0,
"expected a nonempty window text\n" );
8473 ok( bufW[0] == 0xcc,
"got %x\n", bufW[0] );
8481 ok( buf_len == 0,
"got %d\n", buf_len );
8489 ok( buf_len == 0,
"got %d\n", buf_len );
8495 ok( buf_len ==
ARRAYSIZE(
"caption") - 1,
"expected a nonempty window text\n" );
8501 hwnd2 =
CreateWindowExW( 0,
mainclassW,
NULL,
WS_POPUP, 0, 0, 0, 0, 0, 0, 0,
NULL );
8507 memset( bufW, 0xcc,
sizeof(bufW) );
8510 ok( buf_len == 0,
"got %d\n", buf_len );
8511 ok( *bufW == 0,
"got %x\n", *bufW );
8515 memset( bufW, 0xcc,
sizeof(bufW) );
8518 ok( buf_len == 0,
"got %d\n", buf_len );
8519 ok( *bufW == 0xcccc,
"got %x\n", *bufW );
8530 ok(
r != 0,
"expected a nonempty window text\n" );
8531 ok( !
strcmp(
buf,
"caption"),
"got wrong window text '%s'\n",
buf );
8537 ok(
success,
"SetWindowTextA failed\n" );
8543 ok( buf_len != 0,
"expected a nonempty window text\n" );
8544 ok( !
strcmp(
buf,
"new_caption"),
"got wrong window text '%s'\n",
buf );
8550 ok(
r != 0,
"WM_SETTEXT failed\n" );
8556 ok( buf_len != 0,
"expected a nonempty window text\n" );
8557 ok( !
strcmp(
buf,
"another_caption"),
"got wrong window text '%s'\n",
buf );
8574 ok( num_msgs >= 1,
"got %lu wakeups from MsgWaitForMultipleObjects\n", num_msgs );
8587 ok( num_msgs >= 1,
"got %lu wakeups from MsgWaitForMultipleObjects\n", num_msgs );
8592 ok( buf_len != 0,
"expected a nonempty window text\n" );
8593 ok( !
strcmp(
buf,
"thread_caption"),
"got wrong window text '%s'\n",
buf );
8600 ok( buf_len == 4,
"Unexpected text length, %d\n", buf_len );
8601 ok( !
memcmp(
buf,
"text", 4),
"Unexpected window text, '%s'\n",
buf );
8602 ok(
buf[4] == 0x1c,
"Unexpected buffer contents\n" );
8605 memset( bufW, 0x1c,
sizeof(bufW) );
8608 ok( buf_len == 4,
"Unexpected text length, %d\n", buf_len );
8610 ok( bufW[4] == 0,
"Unexpected buffer contents, %#x\n", bufW[4] );
8613 hwnd2 =
CreateWindowExW( 0,
mainclassW,
NULL,
WS_POPUP, 0, 0, 0, 0, 0, 0, 0,
NULL );
8619 ok( buf_len == 4,
"Unexpected text length, %d\n", buf_len );
8620 ok( !
memcmp(
buf,
"text", 4),
"Unexpected window text, '%s'\n",
buf );
8621 ok(
buf[4] == 0,
"Unexpected buffer contents, %#x\n",
buf[4] );
8624 memset( bufW, 0x1c,
sizeof(bufW) );
8627 ok( buf_len == 4,
"Unexpected text length, %d\n", buf_len );
8629 ok( bufW[4] == 0x1c1c,
"Unexpected buffer contents, %#x\n", bufW[4] );
8638 ok(
r == 0,
"WM_GETTEXT should return zero (%Id)\n",
r );
8641 ok(
r == 0,
"WM_GETTEXT should return zero (%Id)\n",
r );
8644 ok(
r == 0,
"WM_GETTEXT should return zero (%Id)\n",
r );
8647 ok(
r == 0,
"WM_GETTEXT should return zero (%Id)\n",
r );
8653 ok(
FALSE,
"FIXME: These tests crash on ReactOS!\n");
8657 ok(
r == 0,
"GetWindowText should return zero (%Id)\n",
r );
8659 ok(
r == 0,
"GetWindowText should return zero (%Id)\n",
r );
8661 ok(
r == 0,
"GetWindowText should return zero (%Id)\n",
r );
8663 ok(
r == 0,
"GetWindowText should return zero (%Id)\n",
r );
8666 ok(
r == 0,
"GetWindowText should return zero (%Id)\n",
r );
8668 ok(
r == 0,
"GetWindowText should return zero (%Id)\n",
r );
8670 ok(
r == 0,
"GetWindowText should return zero (%Id)\n",
r );
8672 ok(
r == 0,
"GetWindowText should return zero (%Id)\n",
r );
8684 BOOL ret, parent_wm_paint, grandparent_wm_paint;
8686 HWND hgrandparent, hparent, hchild;
8688 static const char classNameA[] =
"GetUpdateRectClass";
8694 0, 0, 100, 100, hgrandparent,
NULL, 0,
NULL);
8697 10, 10, 30, 30, hparent,
NULL, 0,
NULL);
8706 ok(!
ret,
"GetUpdateRect returned not empty region\n");
8712 ok(
ret,
"GetUpdateRect returned empty region\n");
8716 parent_wm_paint =
FALSE;
8717 grandparent_wm_paint =
FALSE;
8722 if (
msg.hwnd == hgrandparent) grandparent_wm_paint =
TRUE;
8723 if (
msg.hwnd == hparent) parent_wm_paint =
TRUE;
8727 ok(parent_wm_paint,
"WM_PAINT should have been received in parent\n");
8728 ok(!grandparent_wm_paint,
"WM_PAINT should NOT have been received in grandparent\n");
8743 ok(
ret,
"Failed to register a test class.\n");
8749 0, 0, 100, 100, hgrandparent,
NULL, 0,
NULL);
8752 10, 10, 30, 30, hparent,
NULL, 0,
NULL);
8759 ok(!
ret,
"GetUpdateRect returned not empty region\n");
8765 ok(!
ret,
"GetUpdateRect returned not empty region\n");
8771 ok(
ret,
"GetUpdateRect returned empty region\n");
8775 parent_wm_paint =
FALSE;
8776 grandparent_wm_paint =
FALSE;
8781 if (
msg.hwnd == hgrandparent) grandparent_wm_paint =
TRUE;
8782 if (
msg.hwnd == hparent) parent_wm_paint =
TRUE;
8786 ok(parent_wm_paint,
"WM_PAINT should have been received in parent\n");
8787 ok(!grandparent_wm_paint,
"WM_PAINT should NOT have been received in grandparent\n");
8801 const int waitTime = 2000;
8818 ok(
IsRectEmpty(&updateRect),
"Exposed rect should be empty\n");
8846 static UINT ncredrawflags;
8882 if (loopcount >= 100)
break;
8888 ok(loopcount < 100,
"Detected infinite WM_PAINT loop (%x).\n",
flags);
8920 if (!pGetWindowModuleFileNameA)
8922 win_skip(
"GetWindowModuleFileNameA is not available\n");
8926 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP, 0,0,0,0, 0, 0, 0,
NULL);
8939 ret2 = pGetWindowModuleFileNameA(
hwnd, buf2,
sizeof(buf2));
8940 ok(ret2,
"GetWindowModuleFileNameA error %lu\n",
GetLastError());
8944 ok(ret1 == ret2,
"%u != %u\n", ret1, ret2);
8945 ok(!
strcmp(buf1, buf2),
"%s != %s\n", buf1, buf2);
8951 ok(ret2 == ret1 - 2,
"expected %u, got %u\n", ret1 - 2, ret2);
8954 "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %lu\n",
GetLastError());
8958 ok(!ret2,
"GetModuleFileName should return 0\n");
8961 "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %lu\n",
GetLastError());
8964 ret2 = pGetWindowModuleFileNameA(
hwnd, buf2, ret1 - 2);
8965 ok(ret2 == ret1 - 2,
"expected %u, got %u\n", ret1 - 2, ret2);
8968 "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %lu\n",
GetLastError());
8971 ret2 = pGetWindowModuleFileNameA(
hwnd, buf2, 0);
8972 ok(!ret2,
"expected 0, got %u\n", ret2);
8975 "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %lu\n",
GetLastError());
8981 ret1 = pGetWindowModuleFileNameA(
hwnd, buf1,
sizeof(buf1));
8982 ok(!ret1,
"expected 0, got %u\n", ret1);
8984 "expected ERROR_INVALID_WINDOW_HANDLE, got %lu\n",
GetLastError());
8989 static const WCHAR mainwindowclassW[] = {
'M',
'a',
'i',
'n',
'W',
'i',
'n',
'd',
'o',
'w',
'C',
'l',
'a',
's',
's',0};
8990 static const WCHAR message_windowW[] = {
'm',
'e',
's',
's',
'a',
'g',
'e',
' ',
'w',
'i',
'n',
'd',
'o',
'w',0};
9018 ok(
hwnd != 0,
"CreateWindowExW with parent HWND_MESSAGE failed\n" );
9019 ok( !
GetParent(
hwnd),
"GetParent should return 0 for message only windows\n" );
9022 ok(
parent != 0,
"GetAncestor(GA_PARENT) should not return 0 for message windows\n");
9023 ok(
parent != desktop,
"GetAncestor(GA_PARENT) should not return desktop for message windows\n");
9025 ok(
root ==
hwnd,
"GetAncestor(GA_ROOT) should return hwnd for message windows\n");
9040 ok( found ==
hwnd,
"didn't find message window %p/%p\n", found,
hwnd );
9043 ok( found == 0,
"found message window %p/%p\n", found,
hwnd );
9048 ok( found ==
hwnd,
"didn't find message window %p/%p\n", found,
hwnd );
9071 ok(
GetLastError() == 0xdeadbeef,
"offset %d: error %ld expect unchanged\n",
9108 ok(!!
hwnd,
"Cannot create main window\n");
9114 ok(!!hwnd_msg,
"Cannot create message window\n");
9119 ok(
ret,
"Unexpected failure when calling GetWindowRect()\n");
9120 ok(
rect.left == 220 &&
rect.top == 221 &&
rect.right == 220 + 222 &&
rect.bottom == 221 + 223,
9134 ok(
ret,
"Unexpected failure when calling SetWindowPos()\n");
9137 ok(
ret,
"Unexpected failure when calling SetWindowPos()\n");
9140 ok(
ret,
"Unexpected failure when calling SetWindowPos()\n");
9143 ok(
ret,
"Unexpected failure when calling SetWindowPos()\n");
9146 ok(!!hdwp,
"Unexpected failure when calling BeginDeferWindowPos()\n");
9149 ok(!!hdwp,
"Unexpected failure when calling DeferWindowPos()\n");
9152 ok(!!hdwp,
"Unexpected failure when calling DeferWindowPos()\n");
9155 ok(!!hdwp,
"Unexpected failure when calling DeferWindowPos()\n");
9158 ok(!!hdwp,
"Unexpected failure when calling DeferWindowPos()\n");
9161 ok(
ret,
"Unexpected failure when calling EndDeferWindowPos()\n");
9174 ok(
ret,
"Unexpected failure when calling GetWindowRect()\n");
9175 ok(
rect.left == 220 &&
rect.top == 221 &&
rect.right == 220 + 222 &&
rect.bottom == 221 + 223,
9182 ok(
ret,
"Unexpected failure when calling SetWindowPos()\n");
9193 ok(
ret,
"Unexpected failure when calling GetWindowRect()\n");
9194 ok(
rect.left == 230 &&
rect.top == 231 &&
rect.right == 230 + 232 &&
rect.bottom == 231 + 233,
9209 SIZE sz = { 200, 200 };
9215 if (!pGetLayeredWindowAttributes || !pSetLayeredWindowAttributes || !pUpdateLayeredWindow)
9217 win_skip(
"layered windows not supported\n" );
9226 100, 100, 200, 200, 0, 0, 0,
NULL);
9230 ok( !
ret,
"UpdateLayeredWindow should fail on non-layered window\n" );
9233 ok( !
ret,
"GetLayeredWindowAttributes should fail on non-layered window\n" );
9234 ret = pSetLayeredWindowAttributes(
hwnd, 0, 0, LWA_ALPHA );
9235 ok( !
ret,
"SetLayeredWindowAttributes should fail on non-layered window\n" );
9238 ok( !
ret,
"GetLayeredWindowAttributes should fail on layered but not initialized window\n" );
9240 ok(
ret,
"UpdateLayeredWindow should succeed on layered window\n" );
9242 ok( !
ret,
"GetLayeredWindowAttributes should fail on layered but not initialized window\n" );
9243 ret = pSetLayeredWindowAttributes(
hwnd, 0x123456, 44, LWA_ALPHA );
9244 ok(
ret,
"SetLayeredWindowAttributes should succeed on layered window\n" );
9246 ok(
ret,
"GetLayeredWindowAttributes should succeed on layered window\n" );
9247 ok(
key == 0x123456 ||
key == 0,
"wrong color key %lx\n",
key );
9252 ok( !
ret,
"UpdateLayeredWindow should fail on layered but initialized window\n" );
9259 ok( !
ret,
"UpdateLayeredWindow should fail on non-layered window\n" );
9261 ok( !
ret,
"GetLayeredWindowAttributes should fail on no longer layered window\n" );
9264 ok( !
ret,
"GetLayeredWindowAttributes should fail on layered but not initialized window\n" );
9266 ok(
ret,
"UpdateLayeredWindow should succeed on layered window\n" );
9268 ok( !
ret,
"UpdateLayeredWindow should fail with ex flag\n" );
9270 if (pUpdateLayeredWindowIndirect)
9272 UPDATELAYEREDWINDOWINFO
info;
9283 ret = pUpdateLayeredWindowIndirect(
hwnd, &
info );
9284 ok(
ret,
"UpdateLayeredWindowIndirect should succeed on layered window\n" );
9287 ret = pUpdateLayeredWindowIndirect(
hwnd, &
info );
9288 ok( !
ret,
"UpdateLayeredWindowIndirect should fail\n" );
9293 ret = pUpdateLayeredWindowIndirect(
hwnd, &
info );
9294 ok(
ret,
"UpdateLayeredWindowIndirect should succeed on layered window\n" );
9297 ret = pUpdateLayeredWindowIndirect(
hwnd, &
info );
9298 ok( !
ret,
"UpdateLayeredWindowIndirect should fail\n" );
9302 ret = pUpdateLayeredWindowIndirect(
hwnd, &
info );
9303 ok( !
ret,
"UpdateLayeredWindowIndirect should fail\n" );
9306 ok( !
ret,
"UpdateLayeredWindowIndirect should fail\n" );
9310 ret = pSetLayeredWindowAttributes(
hwnd, 0x654321, 22, LWA_COLORKEY | LWA_ALPHA );
9311 ok(
ret,
"SetLayeredWindowAttributes should succeed on layered window\n" );
9313 ok(
ret,
"GetLayeredWindowAttributes should succeed on layered window\n" );
9314 ok(
key == 0x654321,
"wrong color key %lx\n",
key );
9316 ok(
flags == (LWA_COLORKEY | LWA_ALPHA),
"wrong flags %lx\n",
flags );
9319 ok( !
ret,
"UpdateLayeredWindow should fail on layered but initialized window\n" );
9322 ret = pSetLayeredWindowAttributes(
hwnd, 0x888888, 33, LWA_COLORKEY );
9323 ok(
ret,
"SetLayeredWindowAttributes should succeed on layered window\n" );
9326 ok(
ret,
"GetLayeredWindowAttributes should succeed on layered window\n" );
9327 ok(
key == 0x888888,
"wrong color key %lx\n",
key );
9330 ok(
flags == LWA_COLORKEY,
"wrong flags %lx\n",
flags );
9333 ret = pSetLayeredWindowAttributes(
hwnd, 0x999999, 44, 0 );
9334 ok(
ret,
"SetLayeredWindowAttributes should succeed on layered window\n" );
9337 ok(
ret,
"GetLayeredWindowAttributes should succeed on layered window\n" );
9338 ok(
key == 0x888888 ||
key == 0x999999,
"wrong color key %lx\n",
key );
9345 ret = pSetLayeredWindowAttributes(
hwnd, 0x222222, 55, 0 );
9346 ok(
ret,
"SetLayeredWindowAttributes should succeed on layered window\n" );
9348 ok(
ret,
"GetLayeredWindowAttributes should succeed on layered window\n" );
9349 ok(
key == 0 ||
key == 0x222222,
"wrong color key %lx\n",
key );
9362 ret = pSetLayeredWindowAttributes(
hwnd, 0, 255, LWA_ALPHA );
9363 ok(
ret,
"SetLayeredWindowAttributes should succeed on layered window\n" );
9375 ok(
ret,
"UpdateLayeredWindow should succeed on layered window\n" );
9377 ret = pSetLayeredWindowAttributes(
hwnd, 0, 255, LWA_ALPHA );
9378 ok(
ret,
"SetLayeredWindowAttributes should succeed on layered window\n" );
9381 ok(
FALSE,
"FIXME: This hangs on ReactOS!\n");
9427 ok(!
ret,
"got %08Ix (%08Ix %08Ix)\n",
ret, wp, lp);
9436 static const DWORD t_style[] = {
9439 static const DWORD t_ex_style[] = {
9486 ex_style = t_ex_style[
j];
9491 ok(
hwnd != 0,
"%d: CreateWindowExA(%#lx/%#lx) failed\n",
i, ex_style,
style);
9502 ok(
hwnd != 0,
"%d: CreateWindowExA(%#lx/%#lx) failed\n",
i, ex_style,
style);
9513 ok(
hwnd != 0,
"%d: CreateWindowExA(%#lx/%#lx) failed\n",
i, ex_style,
style);
9524 ok(
hwnd != 0,
"%d: CreateWindowExA(%#lx/%#lx) failed\n",
i, ex_style,
style);
9535 ok(
hwnd != 0,
"%d: CreateWindowExA(%#lx/%#lx) failed\n",
i, ex_style,
style);
9550 ok(
hwnd != 0,
"%d: CreateWindowExA(%#lx/%#lx) failed\n",
i, ex_style,
style);
9605 virtual_rect.
top, virtual_rect.
right - virtual_rect.
left,
9613 ok(
EqualRect(&rc, &virtual_rect),
"Expected %s, got %s.\n",
9635 skip(
"This test requires at least two monitors.\n");
9647 int expectedMinTrackX;
9648 int expectedMinTrackY;
9649 int actualMinTrackX;
9650 int actualMinTrackY;
9651 int expectedMaxTrackX;
9652 int expectedMaxTrackY;
9653 int actualMaxTrackX;
9654 int actualMaxTrackY;
9655 int expectedMaxSizeX;
9656 int expectedMaxSizeY;
9680 adjustedStyle &= ~WS_BORDER;
9691 expectedMinTrackX = -2 *
rect.left;
9692 expectedMinTrackY = -2 *
rect.top;
9697 ok(actualMinTrackX == expectedMinTrackX && actualMinTrackY == expectedMinTrackY,
9698 "expected minTrack %dx%d, actual minTrack %dx%d for %s\n",
9699 expectedMinTrackX, expectedMinTrackY, actualMinTrackX, actualMinTrackY,
9706 ok(actualMaxTrackX == expectedMaxTrackX && actualMaxTrackY == expectedMaxTrackY,
9707 "expected maxTrack %dx%d, actual maxTrack %dx%d for %s\n",
9708 expectedMaxTrackX, expectedMaxTrackY, actualMaxTrackX, actualMaxTrackY,
9711 expectedMaxSizeX =
rect.right -
rect.left;
9712 expectedMaxSizeY =
rect.bottom -
rect.top;
9716 ok(actualMaxSizeX == expectedMaxSizeX && actualMaxSizeY == expectedMaxSizeY,
9717 "expected maxSize %dx%d, actual maxSize %dx%d for %s\n",
9718 expectedMaxSizeX, expectedMaxSizeY, actualMaxSizeX, actualMaxSizeY,
9722 expectedPosX =
rect.left;
9723 expectedPosY =
rect.top;
9726 ok(actualPosX == expectedPosX && actualPosY == expectedPosY,
9727 "expected maxPosition (%d/%d), actual maxPosition (%d/%d) for %s\n",
9744#define NUMBER_OF_THICK_CHILD_TESTS 16
9749 RECT adjustedParentRect;
9754 LONG expectedHeight;
9756 static const char className[] =
"THICK_CHILD_CLASS";
9797 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME",
9798 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME",
9799 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME | WS_BORDER",
9800 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_BORDER",
9801 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME, exstyle= WS_EX_DLGMODALFRAME",
9802 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME exstyle= WS_EX_DLGMODALFRAME",
9803 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME | WS_BORDER exstyle= WS_EX_DLGMODALFRAME",
9804 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_BORDER exstyle= WS_EX_DLGMODALFRAME",
9805 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME exstyle= WS_EX_STATICEDGE",
9806 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME exstyle= WS_EX_STATICEDGE",
9807 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME | WS_BORDER exstyle= WS_EX_STATICEDGE",
9808 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_BORDER exstyle= WS_EX_STATICEDGE",
9809 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME, exstyle= WS_EX_STATICEDGE | WS_EX_DLGMODALFRAME",
9810 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME exstyle= WS_EX_STATICEDGE | WS_EX_DLGMODALFRAME",
9811 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME | WS_BORDER exstyle= WS_EX_STATICEDGE | WS_EX_DLGMODALFRAME",
9812 "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_BORDER exstyle= WS_EX_STATICEDGE | WS_EX_DLGMODALFRAME",
9837 childWindow =
CreateWindowExA( exStyles[
i], className,
"", styles[
i], 0, 0, 0, 0, parentWindow, 0,
GetModuleHandleA(0),
NULL );
9838 ok(childWindow !=
NULL,
"Failed to create child window, error: %lu\n",
GetLastError());
9845 childWidth = childRect.
right - childRect.
left;
9846 childHeight = childRect.
bottom - childRect.
top;
9848 adjustedStyle = styles[
i];
9850 adjustedStyle &= ~WS_BORDER;
9862 expectedWidth = -2 * adjustedParentRect.
left;
9863 expectedHeight = -2 * adjustedParentRect.
top;
9866 ok((childWidth == expectedWidth) && (childHeight == expectedHeight),
9867 "size of window (%s) is wrong: expected size %ldx%ld != actual size %ldx%ld\n",
9904 ok( !
ret,
"GetWindowRect succeeded for %p\n",
hwnd );
9910 ok( !
ret,
"GetWindowRect succeeded for %p\n",
hwnd );
9922 if (!pGetWindowRgnBox)
9924 win_skip(
"GetWindowRgnBox not supported\n");
9928 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_VISIBLE, 10, 10, 10, 10,
NULL, 0, 0,
NULL);
9936 ok(
hrgn !=
NULL,
"Region creation failed\n");
9949 ok(
r.left == 2 &&
r.top == 3 &&
r.right == 10 &&
r.bottom == 15,
9962 ok(
r.left ==
width - 10 &&
r.top == 3 &&
r.right ==
width - 2 &&
r.bottom == 15,
9965 else win_skip(
"MirrorRgn not supported\n" );
9976 if (!pSetProcessDefaultLayout)
9978 win_skip(
"SetProcessDefaultLayout not supported\n" );
9982 parent =
CreateWindowExA(
WS_EX_LAYOUTRTL,
"static",
NULL,
WS_POPUP, 100, 100, 300, 300,
NULL, 0, 0,
NULL);
9983 child =
CreateWindowExA(0,
"static",
NULL,
WS_CHILD, 10, 10, 20, 20,
parent, 0, 0,
NULL);
10003 ok(
pt.x == 22 &&
pt.y == 22,
"wrong point %ld,%ld\n",
pt.x,
pt.y );
10034 win_skip(
"FlashWindow not supported\n" );
10039 0, 0, 0, 0, 0, 0, 0,
NULL );
10063 if (!pFlashWindowEx)
10065 win_skip(
"FlashWindowEx not supported\n" );
10070 0, 0, 0, 0, 0, 0, 0,
NULL );
10073 finfo.cbSize =
sizeof(FLASHWINFO);
10074 finfo.dwFlags = FLASHW_TIMER;
10076 finfo.dwTimeout = 200;
10079 ret = pFlashWindowEx(&finfo);
10091 ret = pFlashWindowEx(&finfo);
10092 todo_wine ok(!
ret,
"previous window state should not be active\n");
10094 finfo.cbSize =
sizeof(FLASHWINFO) - 1;
10096 ret = pFlashWindowEx(&finfo);
10098 "FlashWindowEx succeeded\n");
10100 finfo.cbSize =
sizeof(FLASHWINFO) + 1;
10102 ret = pFlashWindowEx(&finfo);
10104 "FlashWindowEx succeeded\n");
10105 finfo.cbSize =
sizeof(FLASHWINFO);
10110 ret = pFlashWindowEx(&finfo);
10115 ok(finfo.cbSize ==
sizeof(FLASHWINFO),
"FlashWindowEx modified cdSize to %x\n", finfo.cbSize);
10116 ok(finfo.hwnd ==
hwnd,
"FlashWindowEx modified hwnd to %p\n", finfo.hwnd);
10117 ok(finfo.dwFlags == FLASHW_TIMER,
"FlashWindowEx modified dwFlags to %lx\n", finfo.dwFlags);
10118 ok(finfo.uCount == 3,
"FlashWindowEx modified uCount to %x\n", finfo.uCount);
10119 ok(finfo.dwTimeout == 200,
"FlashWindowEx modified dwTimeout to %lx\n", finfo.dwTimeout);
10122 0, 0, 0, 0, 0, 0, 0,
NULL );
10132 prev = pFlashWindowEx(&finfo);
10134 ok(finfo.cbSize ==
sizeof(FLASHWINFO),
"FlashWindowEx modified cdSize to %x\n", finfo.cbSize);
10135 ok(finfo.hwnd ==
hwnd,
"FlashWindowEx modified hwnd to %p\n", finfo.hwnd);
10136 ok(finfo.dwFlags == FLASHW_TIMER,
"FlashWindowEx modified dwFlags to %lx\n", finfo.dwFlags);
10137 ok(finfo.uCount == 3,
"FlashWindowEx modified uCount to %x\n", finfo.uCount);
10138 ok(finfo.dwTimeout == 200,
"FlashWindowEx modified dwTimeout to %lx\n", finfo.dwTimeout);
10140 finfo.dwFlags = FLASHW_STOP;
10142 ret = pFlashWindowEx(&finfo);
10143 ok(prev !=
ret,
"previous window state should be different\n");
10152 hwnd =
CreateWindowExA( 0,
"MainWindowClass",
"caption",
WS_POPUP, 0,0,0,0, 0, 0, 0,
NULL );
10157 ok( found ==
NULL,
"expected a NULL hwnd\n" );
10162 ok( found ==
NULL,
"expected a NULL hwnd\n" );
10167 ok( found ==
NULL,
"expected a NULL hwnd\n" );
10172 ok( found ==
hwnd,
"found is %p, expected a valid hwnd\n", found );
10176 found =
FindWindowExA( 0, 0,
"MainWindowClass",
"caption" );
10177 ok( found ==
hwnd,
"found is %p, expected a valid hwnd\n", found );
10182 hwnd =
CreateWindowExA( 0,
"MainWindowClass",
NULL,
WS_POPUP, 0,0,0,0, 0, 0, 0,
NULL );
10187 ok( found ==
hwnd,
"found is %p, expected a valid hwnd\n", found );
10192 ok( found ==
hwnd,
"found is %p, expected a valid hwnd\n", found );
10199 ok( found !=
NULL,
"found is NULL, expected a valid hwnd\n" );
10201 ok( found !=
NULL,
"found is NULL, expected a valid hwnd\n" );
10208 hwnd =
CreateWindowExA( 0,
"MainWindowClass",
"caption",
WS_POPUP, 0,0,0,0, 0, 0, 0,
NULL );
10212 found =
FindWindowA(
"ClassThatDoesntExist",
"" );
10213 ok( found ==
NULL,
"expected a NULL hwnd\n" );
10218 ok( found ==
NULL,
"expected a NULL hwnd\n" );
10223 ok( found ==
NULL,
"expected a NULL hwnd\n" );
10228 ok( found ==
hwnd,
"found is %p, expected a valid hwnd\n", found );
10232 found =
FindWindowA(
"MainWindowClass",
"caption" );
10233 ok( found ==
hwnd,
"found is %p, expected a valid hwnd\n", found );
10238 hwnd =
CreateWindowExA( 0,
"MainWindowClass",
NULL,
WS_POPUP, 0,0,0,0, 0, 0, 0,
NULL );
10243 ok( found ==
hwnd,
"found is %p, expected a valid hwnd\n", found );
10248 ok( found ==
hwnd,
"found is %p, expected a valid hwnd\n", found );
10255 ok( found !=
NULL,
"found is NULL, expected a valid hwnd\n" );
10257 ok( found !=
NULL,
"found is NULL, expected a valid hwnd\n" );
10262 HWND hwndOwner, hwndPopup1, hwndPopup2;
10266 100, 100, 200, 200,
10270 100, 100, 200, 200,
10274 100, 100, 200, 200,
10417 static const int real_child_pos[] = { 14,15,16,17,18,19,20,21,24,25,26,27,42,43,
10418 44,45,46,47,48,49,52,53,54,55,51,50,23,22,-1 };
10422 int found_invisible, found_disabled, found_groupbox, found_httransparent, found_extransparent;
10426 ok(
ret,
"GetClassInfo(Button) failed\n");
10429 ok(
ret,
"RegisterClass(my_button) failed\n");
10434 ok(
ret,
"RegisterClass(my_httrasparent) failed\n");
10439 ok(
ret,
"RegisterClass(my_window) failed\n");
10443 100, 100, 200, 200,
10445 ok(
parent != 0,
"CreateWindowEx failed\n");
10450 found_invisible = 0;
10451 found_disabled = 0;
10452 found_groupbox = 0;
10453 found_httransparent = 0;
10454 found_extransparent = 0;
10463 ok(
hwnd != 0,
"RealChildWindowFromPoint failed\n");
10467 ok(
ret == real_child_pos[
i],
"expected %d, got %d\n", real_child_pos[
i],
ret);
10476 if (
ret != real_child_pos[
i] &&
ret != -1)
10478 trace(
"found hwnd %p (%s), is_visible %d, is_enabled %d, is_groupbox %d, is_httransparent %d, is_extransparent %d\n",
10481 trace(
"expected hwnd %p (%s), is_visible %d, is_enabled %d, is_groupbox %d, is_httransparent %d, is_extransparent %d\n",
10494 ok(!found_invisible,
"found %d invisible windows\n", found_invisible);
10495 ok(found_disabled,
"found %d disabled windows\n", found_disabled);
10497 ok(found_groupbox == 4,
"found %d groupbox windows\n", found_groupbox);
10498 ok(found_httransparent,
"found %d httransparent windows\n", found_httransparent);
10500 ok(found_extransparent,
"found %d extransparent windows\n", found_extransparent);
10503 ok(
ret,
"UnregisterClass(my_button) failed\n");
10505 ok(
ret,
"UnregisterClass(my_httrasparent) failed\n");
10507 ok(
ret,
"UnregisterClass(my_window) failed\n");
10528 ok(events_no == 2,
"SendInput returned %d\n", events_no);
10539 ok(0,
"unexpected call\n");
10547 HANDLE win, child_static, child_button;
10556 ok(end_event != 0,
"OpenEvent failed\n");
10560 ok(child_static != 0,
"CreateWindowEx failed\n");
10568 ok(child_button != 0,
"CreateWindowEx failed\n");
10572 ok(
win == child_button,
"WindowFromPoint returned %p, expected %p\n",
win, child_button);
10578 ok(
win != 0,
"CreateWindowEx failed\n");
10588 ok(
msg.hwnd ==
win,
"msg.hwnd = %p, expected %p\n",
msg.hwnd,
win);
10593 ok(
got_hittest,
"transparent window didn't get WM_NCHITTEST message\n");
10594 ok(got_click,
"button under static window didn't get WM_LBUTTONUP\n");
10613 100, 100, 200, 100, main_window, 0,
NULL,
NULL);
10614 ok(
hwnd != 0,
"CreateWindowEx failed\n");
10625 skip(
"there's another window covering test window\n");
10632 ok(
child != 0,
"CreateWindowEx failed\n");
10641 ok(
child != 0,
"CreateWindowEx failed\n");
10686 HWND wnd, wnd0, dwnd;
10696 wnd =
CreateWindowA(
"static",
"test1",
WS_POPUP,
pos.x,
pos.y,
width,
height,
NULL,
NULL,
NULL,
NULL);
10697 ok(wnd !=
NULL,
"Failed %p\n", wnd);
10698 wnd0 =
CreateWindowA(
"static",
"test2",
WS_POPUP, 0, 0,
width,
height,
NULL,
NULL,
NULL,
NULL);
10699 ok(wnd0 !=
NULL,
"Failed %p\n", wnd);
10700 dwnd =
CreateWindowA(
"static",
"test3", 0, 200, 300, 150, 150,
NULL,
NULL,
NULL,
NULL);
10702 ok(dwnd !=
NULL,
"Failed %p\n", dwnd);
10706 ok(window_rect.
left ==
pos.x,
"left is %ld instead of %ld\n", window_rect.
left,
pos.x);
10707 ok(window_rect.
top ==
pos.y,
"top is %ld instead of %ld\n", window_rect.
top,
pos.y);
10711 ok(client_rect.
left == 0,
"left is %ld instead of 0\n", client_rect.
left);
10712 ok(client_rect.
top == 0,
"top is %ld instead of 0\n", client_rect.
top);
10723 ok(
n == 0,
"Got %d, expected %d\n",
n, 0);
10724 ok(
err == 0xdeadbeef,
"Got %lx, expected %x\n",
err, 0xdeadbeef);
10729 ok(
n == 0,
"Got %d, expected %d\n",
n, 0);
10730 ok(
err == 0xdeadbeef,
"Got %lx, expected %x\n",
err, 0xdeadbeef);
10744 ok(
n == 0,
"Got %d, expected %d\n",
n, 0);
10745 ok(
p.x == 100 &&
p.y == 100,
"Failed got(%ld, %ld), expected (%d, %d)\n",
p.x,
p.y, 100, 100);
10752 ok(
n == 0,
"Got %d, expected %d\n",
n, 0);
10753 ok(
p.x == 100 &&
p.y == 100,
"Failed got(%ld, %ld), expected (%d, %d)\n",
p.x,
p.y, 100, 100);
10760 ok(
n == 0,
"Got %d, expected %d\n",
n, 0);
10761 ok(
p.x == 100 &&
p.y == 100,
"Failed got(%ld, %ld), expected (%d, %d)\n",
p.x,
p.y, 100, 100);
10768 ok(
n == 0,
"Got %d, expected %d\n",
n, 0);
10769 ok(
p.x == 100 &&
p.y == 100,
"Failed got(%ld, %ld), expected (%d, %d)\n",
p.x,
p.y, 100, 100);
10776 ok(
n == 0,
"Got %d, expected %d\n",
n, 0);
10777 ok(
p.x == 100 &&
p.y == 100,
"Failed got(%ld, %ld), expected (%d, %d)\n",
p.x,
p.y, 100, 100);
10784 ok(
n == 0,
"Got %d, expected %d\n",
n, 0);
10785 ok(
p.x == 100 &&
p.y == 100,
"Failed got(%ld, %ld), expected (%d, %d)\n",
p.x,
p.y, 100, 100);
10786 ok(
err == 0xdeadbeef,
"Got %lx, expected %x\n",
err, 0xdeadbeef);
10792 ok(
n == 0,
"Got %d, expected %d\n",
n, 0);
10793 ok(
p.x == 100 &&
p.y == 100,
"Failed got(%ld, %ld), expected (%d, %d)\n",
p.x,
p.y, 100, 100);
10794 ok(
err == 0xdeadbeef,
"Got %lx, expected %x\n",
err, 0xdeadbeef);
10800 ok((
p.x == (window_rect.
left + 100)) && (
p.y == (window_rect.
top + 100)),
"Failed got (%ld, %ld), expected (%ld, %ld)\n",
10801 p.x,
p.y, window_rect.
left + 100, window_rect.
top + 100);
10807 ok((
p.x == (-window_rect.
left + 100)) && (
p.y == (-window_rect.
top + 100)),
"Failed got (%ld, %ld), expected (%ld, %ld)\n",
10808 p.x,
p.y, -window_rect.
left + 100, -window_rect.
top + 100);
10814 ok(
n == 0,
"Got %x, expected 0\n",
n);
10815 ok((
p.x == 0) && (
p.y == 0),
"Failed got (%ld, %ld), expected (0, 0)\n",
p.x,
p.y);
10816 ok(
err == 0xdeadbeef,
"Got %lx, expected %x\n",
err, 0xdeadbeef);
10822 ok(
n == 0,
"Got %x, expected 0\n",
n);
10823 ok((
p.x == 0) && (
p.y == 0),
"Failed got (%ld, %ld), expected (0, 0)\n",
p.x,
p.y);
10824 ok(
err == 0xdeadbeef,
"Got %lx, expected %x\n",
err, 0xdeadbeef);
10833 ok(!
ret,
"Should fail\n");
10840 ok(!
ret,
"Should fail\n");
10841 ok(
p.x == 100 &&
p.y == 100,
"Failed got(%ld, %ld), expected (%d, %d)\n",
p.x,
p.y, 100, 100);
10848 ok(!
ret,
"Should fail\n");
10849 ok(
p.x == 100 &&
p.y == 100,
"Failed got(%ld, %ld), expected (%d, %d)\n",
p.x,
p.y, 100, 100);
10855 ok((
p.x == (window_rect.
left + 100)) && (
p.y == (window_rect.
top + 100)),
"Failed got (%ld, %ld), expected (%ld, %ld)\n",
10856 p.x,
p.y, window_rect.
left + 100, window_rect.
top + 100);
10861 ok((
p.x == 0) && (
p.y == 0),
"Failed got (%ld, %ld), expected (0, 0)\n",
p.x,
p.y);
10870 ok(!
ret,
"Should fail\n");
10877 ok(!
ret,
"Should fail\n");
10878 ok(
p.x == 100 &&
p.y == 100,
"Failed got(%ld, %ld), expected (%d, %d)\n",
p.x,
p.y, 100, 100);
10885 ok(!
ret,
"Should fail\n");
10886 ok(
p.x == 100 &&
p.y == 100,
"Failed got(%ld, %ld), expected (%d, %d)\n",
p.x,
p.y, 100, 100);
10892 ok((
p.x == (-window_rect.
left + 100)) && (
p.y == (-window_rect.
top + 100)),
"Failed got(%ld, %ld), expected (%ld, %ld)\n",
10893 p.x,
p.y, -window_rect.
left + 100, -window_rect.
top + 100);
10898 ok((
p.x == 0) && (
p.y == 0),
"Failed got (%ld, %ld), expected (0, 0)\n",
p.x,
p.y);
10908 const RECT rc = {15, 15, 40, 40};
10909 const POINT wnd_orig = {30, 20};
10910 const POINT child_orig = {10, 5};
10920 child_orig.
x, child_orig.
y, 100, 50,
10931 "has invalid area after ValidateRgn(NULL)\n");
10934 ok(
EqualRgn(rgn1, rgn2),
"assigned and retrieved update regions are different\n");
10936 "has invalid area after ValidateRgn(NULL)\n");
10952 ok(
EqualRgn(rgn1, rgn2),
"wrong update region\n");
10957 ok(
EqualRgn(rgn1, rgn2),
"wrong update region\n");
10964 ok(
EqualRgn(rgn1, rgn2),
"wrong update region\n");
10980 "can't remove WS_CHILD style\n");
11038 ok(
res == 0x449b0190,
"unexpected result %Ix\n",
res);
11066 100, 100, 200, 200, 0, 0, 0,
NULL);
11067 ok(
data->thread_hwnd != 0,
"Failed to create overlapped window\n");
11118 ok(
ret,
"RegisterClassA failed\n");
11121 ok(
data.thread_started !=
NULL,
"CreateEventA failed\n");
11124 ok(
data.thread_got_wm_app !=
NULL,
"CreateEventA failed\n");
11127 ok(
data.main_in_wm_app_1 !=
NULL,
"CreateEventA failed\n");
11130 ok(
data.thread_replied !=
NULL,
"CreateEventA failed\n");
11133 100, 100, 200, 200, 0, 0, 0,
NULL);
11141 ok(
res == 0x240408ea,
"unexpected result %Ix\n",
res);
11163 100, 100, 100, 100, 0, 0, 0,
NULL);
11164 ok(
button != 0,
"CreateWindowExA failed\n");
11222#define SET_FOREGROUND_STEAL_1 0x01
11223#define SET_FOREGROUND_SET_1 0x02
11224#define SET_FOREGROUND_STEAL_2 0x04
11225#define SET_FOREGROUND_SET_2 0x08
11226#define SET_FOREGROUND_INJECT 0x10
11241 0, 0, 10, 10, 0, 0, 0,
NULL);
11246 if (
msg.message ==
p->msg_quit)
11249 if (
msg.message ==
p->msg_command)
11297 300, 0, 10, 10, 0, 0, 0,
NULL);
11320 ok(!
app_activated,
"Received WM_ACTIVATEAPP(1), did not expect it.\n");
11327 ok(!
app_activated,
"Received WM_ACTIVATEAPP(1), did not expect it.\n");
11339 ok(!
app_activated,
"Received WM_ACTIVATEAPP(!= 0), did not expect it.\n");
11346 ok(
app_activated,
"Expected WM_ACTIVATEAPP(1), did not receive it.\n");
11357 ok(!
app_activated,
"Received WM_ACTIVATEAPP(1), did not expect it.\n");
11364 ok(!
app_activated,
"Received WM_ACTIVATEAPP(1), did not expect it.\n");
11376 ok(!
app_activated,
"Received WM_ACTIVATEAPP(1), did not expect it.\n");
11383 ok(!
app_activated,
"Received WM_ACTIVATEAPP(1), did not expect it.\n");
11396 ok(!
app_activated,
"Received WM_ACTIVATEAPP(1), did not expect it.\n");
11406 ok(
app_activated,
"Expected WM_ACTIVATEAPP(1), did not receive it.\n");
11423 ok(!
app_activated,
"Received WM_ACTIVATEAPP(1), did not expect it.\n");
11430 ok(!
app_activated,
"Received WM_ACTIVATEAPP(1), did not expect it.\n");
11478 static const WCHAR winproc_testW[] = {
'w',
'i',
'n',
'p',
'r',
'o',
'c',
'_',
't',
'e',
's',
't',0};
11488 memset(&wnd_classA, 0,
sizeof(wnd_classA));
11497 "winproc pointers should not be identical\n");
11501 ok(
count == 1,
"winproc should be called once (%d)\n",
count);
11504 ok(
count == 1,
"winproc should be called once (%d)\n",
count);
11510 if (
sizeof(
void*) == 4)
11536 hwnd =
CreateWindowExA(0,
"static",
"test",
WS_POPUP, 0, 0, 0, 0, 0, 0, 0, 0);
11537 ok(
hwnd != 0,
"CreateWindowEx failed\n");
11540 "SetWindowLongPtr failed\n");
11542 ok(winproc_handle !=
winproc,
"winproc pointers should not be identical\n");
11545 for(
i = 2;
i<0xffff;
i++)
11551 ok(
i != 0xffff,
"unable to run out of winproc slots\n");
11565 "winproc_convW returned error\n");
11567 "winproc_convW returned error\n");
11571 ok(
i == 1,
"winproc should be called once (%d)\n",
i);
11574 ok(
i == 1,
"winproc should be called once (%d)\n",
i);
11580 ok(
i == 1,
"winproc should be called once (%d)\n",
i);
11583 ok(
i == 1,
"winproc should be called once (%d)\n",
i);
11593 ok(hdwp !=
NULL,
"got %p\n", hdwp);
11620 ok(hdwp !=
NULL,
"got %p\n", hdwp);
11635 HWND hwnd_lock, hwnd_draw;
11636 BOOL allow_drawing;
11641 HWND child =
CreateWindowA(
"static", 0,
WS_CHILD |
WS_VISIBLE, 0, 0, 20, 20,
parent, 0, 0, 0);
11656 skip(
"CreateWindow failed, skipping LockWindowUpdate tests\n");
11670 const COLORREF c1 = 0x111100, c2 = 0x222200;
11674#define TEST_PIXEL(c_valid, c_invalid) \
11676 COLORREF c = GetPixel(hdc, p.x, p.y); \
11677 COLORREF e = tests[i].expect_valid ? (c_valid) : (c_invalid); \
11678 todo_wine_if(!tests[i].expect_valid) \
11679 ok(c == e, "%u: GetPixel: got %08lx, expected %08lx\n", i, c, e); \
11684 ok(
ret,
"%u: LockWindowUpdate failed\n",
i);
11909 static const struct
11939 ok(
GetLastError() == 0xdeadbeef,
"offset %d: error %ld expect unchanged\n",
11954 ok(
ret,
"SetWindowPos failed\n");
11962 for (
i = 0;
i <
n;
i++)
11976 HWND owner,
hwnd, hwnd2, hwnd_child, hwnd_child2, hwnd_grandchild,
state[6] = { 0 };
11981 ok(owner != 0,
"Failed to create owner window (%ld)\n",
GetLastError());
11987 skip(
"SetForegroundWindow not working\n");
11996 ok(hwnd2 != 0,
"Failed to create popup window (%ld)\n",
GetLastError());
12005 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12007 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12011 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12013 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12016 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12018 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12021 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12023 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12028 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12030 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12033 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12035 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12038 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12040 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12043 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12045 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12062 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12068 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12070 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12073 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12076 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12082 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12084 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12087 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12090 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12095 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12097 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12103 ok(hwnd_child2 != 0,
"Failed to create popup window (%ld)\n",
GetLastError());
12105 ok(hwnd_child != 0,
"Failed to create popup window (%ld)\n",
GetLastError());
12107 ok(hwnd_grandchild != 0,
"Failed to create popup window (%ld)\n",
GetLastError());
12112 trace(
"hwnd_child %p, hwnd_child2 %p, hwnd_grandchild %p\n", hwnd_child, hwnd_child2, hwnd_grandchild);
12113 state[3] = hwnd_child2;
12114 state[4] = hwnd_child;
12115 state[5] = hwnd_grandchild;
12117 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12119 ok(!
is_topmost(hwnd2),
"hwnd2 should NOT be topmost\n");
12120 ok(!
is_topmost(hwnd_child),
"child should NOT be topmost\n");
12121 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12122 ok(!
is_topmost(hwnd_grandchild),
"grandchild should NOT be topmost\n");
12128 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12132 ok(
is_topmost(hwnd_child),
"child should be topmost\n");
12134 ok(
is_topmost(hwnd_child2),
"child2 should be topmost\n");
12135 ok(
is_topmost(hwnd_grandchild),
"grandchild should be topmost\n");
12141 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12143 ok(!
is_topmost(hwnd_child),
"child should NOT be topmost\n");
12144 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12146 ok(!
is_topmost(hwnd_grandchild),
"grandchild should NOT be topmost\n");
12153 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12157 ok(
is_topmost(hwnd_child),
"child should be topmost\n");
12159 ok(
is_topmost(hwnd_child2),
"child2 should be topmost\n");
12160 ok(
is_topmost(hwnd_grandchild),
"grandchild should be topmost\n");
12166 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12168 ok(!
is_topmost(hwnd_child),
"child should NOT be topmost\n");
12169 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12171 ok(!
is_topmost(hwnd_grandchild),
"grandchild should NOT be topmost\n");
12177 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12181 ok(
is_topmost(hwnd_child),
"child should be topmost\n");
12183 ok(
is_topmost(hwnd_child2),
"child2 should be topmost\n");
12184 ok(
is_topmost(hwnd_grandchild),
"grandchild should be topmost\n");
12190 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12192 ok(!
is_topmost(hwnd_child),
"child should NOT be topmost\n");
12193 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12195 ok(!
is_topmost(hwnd_grandchild),
"grandchild should NOT be topmost\n");
12201 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12204 ok(
is_topmost(hwnd_child),
"child should be topmost\n");
12205 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12206 ok(
is_topmost(hwnd_grandchild),
"grandchild should be topmost\n");
12212 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12215 ok(
is_topmost(hwnd_child),
"child should be topmost\n");
12216 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12217 ok(
is_topmost(hwnd_grandchild),
"grandchild should be topmost\n");
12223 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12225 ok(!
is_topmost(hwnd_child),
"child should NOT be topmost\n");
12226 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12235 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12238 ok(
is_topmost(hwnd_child),
"child should be topmost\n");
12239 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12240 ok(
is_topmost(hwnd_grandchild),
"grandchild should be topmost\n");
12246 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12248 ok(!
is_topmost(hwnd_child),
"child should NOT be topmost\n");
12249 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12251 ok(!
is_topmost(hwnd_grandchild),
"grandchild should NOT be topmost\n");
12258 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12260 ok(!
is_topmost(hwnd_child),
"child should NOT be topmost\n");
12261 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12262 ok(
is_topmost(hwnd_grandchild),
"grandchild should be topmost\n");
12267 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12269 ok(!
is_topmost(hwnd_child),
"child should NOT be topmost\n");
12270 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12279 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12282 ok(
is_topmost(hwnd_child),
"child should be topmost\n");
12283 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12284 ok(
is_topmost(hwnd_grandchild),
"grandchild should be topmost\n");
12290 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12292 ok(!
is_topmost(hwnd_child),
"child should NOT be topmost\n");
12293 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12295 ok(!
is_topmost(hwnd_grandchild),
"grandchild should NOT be topmost\n");
12303 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12306 ok(
is_topmost(hwnd_child),
"child should be topmost\n");
12307 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12308 ok(
is_topmost(hwnd_grandchild),
"grandchild should be topmost\n");
12314 ok(!
is_topmost(owner),
"owner should NOT be topmost\n");
12316 ok(!
is_topmost(hwnd_child),
"child should NOT be topmost\n");
12317 ok(!
is_topmost(hwnd_child2),
"child2 should NOT be topmost\n");
12319 ok(!
is_topmost(hwnd_grandchild),
"grandchild should NOT be topmost\n");
12340 if (!pGetWindowDisplayAffinity || !pSetWindowDisplayAffinity)
12342 win_skip(
"GetWindowDisplayAffinity or SetWindowDisplayAffinity missing\n");
12347 ok(!
ret,
"GetWindowDisplayAffinity succeeded\n");
12351 ok(!
ret,
"GetWindowDisplayAffinity succeeded\n");
12355 ok(!
ret,
"GetWindowDisplayAffinity succeeded\n");
12369 "SetWindowDisplayAffinity failed with %lu\n",
GetLastError());
12380 "SetWindowDisplayAffinity failed with %lu\n",
GetLastError());
12396 "SetWindowDisplayAffinity failed with %lu\n",
GetLastError());
12406 "SetWindowDisplayAffinity failed with %lu\n",
GetLastError());
12477 "destroy test thread",
WS_CHILD, 100, 100, 100, 100,
12498 "destroy test thread",
WS_CHILD, 100, 100, 100, 100,
12526 memset(&wnd_classA, 0,
sizeof(wnd_classA));
12557 switch (
msg.message)
12588 ok(!
ret,
"Expect IsWindowEnabled() return FALSE\n");
12592 ok(
ret,
"Expect IsWindowEnabled() return TRUE\n");
12596 ok(
ret,
"Expect IsWindowEnabled() return TRUE\n");
12599 ok(!
ret,
"Expect IsWindowEnabled() return FALSE\n");
12605 RECT orig = {100, 200, 300, 400}, orig2 = {200, 300, 400, 500},
rect, work_rect;
12615 mon_info.
cbSize =
sizeof(mon_info);
12617 work_rect = mon_info.
rcWork;
12678 SetWindowPos(
hwnd, 0, work_rect.left, work_rect.top, work_rect.right - work_rect.left,
12690 SetWindowPos(
hwnd, 0, work_rect.left, work_rect.top, work_rect.right - work_rect.left - 1,
12702 SetWindowPos(
hwnd, 0, work_rect.left, work_rect.top, work_rect.right - work_rect.left,
12879 ok(!
ret,
"SetWindowPlacement should have failed\n");
12895 100, 200, 500, 300,
NULL, 0, 0,
NULL);
12919 ok(!!hwnds[
i],
"failed to create window %u, error %lu\n",
i,
GetLastError());
12946 ok(
ret == 1,
"wrong ret %u\n",
ret);
12973 ok(
ret == 10,
"wrong ret %u\n",
ret);
13008 ok(
ret == 10,
"wrong ret %u\n",
ret);
13010 col = parent_rect.right - mm.
iHorzGap;
13040 HANDLE window_ready_event, test_done_event;
13045 ok(!!window_ready_event,
"OpenEvent failed.\n");
13047 ok(!!test_done_event,
"OpenEvent failed.\n");
13053 ok(
ret,
"Unexpected ret %#lx.\n",
ret);
13062 ok(
ret,
"Unexpected ret %#lx.\n",
ret);
13071 ok(
ret,
"Unexpected ret %#lx.\n",
ret);
13080 ok(
ret,
"Unexpected ret %#lx.\n",
ret);
13096 100, 100, 100, 100, 0, 0,
NULL,
NULL);
13097 ok(!!
hwnd,
"CreateWindowEx failed.\n");
13100 ok(
rect.left == 100,
"rect.left = %ld\n",
rect.left);
13101 ok(
rect.top == 100,
"rect.top = %ld\n",
rect.top);
13102 ok(
rect.right == 200,
"rect.right = %ld\n",
rect.right);
13103 ok(
rect.bottom == 200,
"rect.bottom = %ld\n",
rect.bottom);
13120 ok(
rect.left == 110,
"rect.left = %ld\n",
rect.left);
13121 ok(
rect.top == 100,
"rect.top = %ld\n",
rect.top);
13122 ok(
rect.right == 210,
"rect.right = %ld\n",
rect.right);
13123 ok(
rect.bottom == 200,
"rect.bottom = %ld\n",
rect.bottom);
13130 HANDLE window_ready_event, test_done_event;
13138 100, 100, 100, 100, 0, 0,
NULL,
NULL);
13139 ok(!!
hwnd,
"CreateWindowEx failed.\n");
13142 ok(!!window_ready_event,
"CreateEvent failed.\n");
13144 ok(!!test_done_event,
"CreateEvent failed.\n");
13154 ok(!
ret,
"Unexpected ret %#x.\n",
ret);
13160 ok(
ret,
"Unexpected ret %#x.\n",
ret);
13166 ok(
ret,
"Unexpected ret %#x.\n",
ret);
13172 ok(
ret,
"Unexpected ret %#x.\n",
ret);
13247 hwnd =
CreateWindowA(
"static",
"test",
WS_POPUP |
WS_VISIBLE, 100, 100, 50, 50, 0, 0, 0, 0 );
13255 ok(
ret,
"Got unexpected %d.\n",
ret);
13288 ok(
ret,
"Got unexpected %d\n",
ret);
13306 ok( !
ret,
"SetWindowPos succeeded\n" );
13334 0, 0, 100, 100,
hwnd, 0, 0,
NULL );
13364 RECT client_rect, window_rect;
13386 params.rgrc[0] = window_rect;
13387 params.rgrc[1] = window_rect;
13390 params.rgrc[2] = client_rect;
13394 winpos.
x = window_rect.
left;
13395 winpos.
y = window_rect.
top;
13396 winpos.
cx = window_rect.
right - window_rect.
left;
13397 winpos.
cy = window_rect.
bottom - window_rect.
top;
13405 params.rgrc[0] = window_rect;
13423#define TRAY_MINIMIZE_ALL 419
13424#define TRAY_MINIMIZE_ALL_UNDO 416
13432 skip(
"Shell_TrayWnd not found, skipping tests.\n" );
13437 100, 100, 200, 200, 0, 0, 0,
NULL );
13486 ok(!!atom,
"RegisterClassA failed, error %#lx.\n",
GetLastError());
13534 pGetWindowInfo = (
void *)
GetProcAddress( user32,
"GetWindowInfo" );
13535 pGetWindowModuleFileNameA = (
void *)
GetProcAddress( user32,
"GetWindowModuleFileNameA" );
13536 pGetLayeredWindowAttributes = (
void *)
GetProcAddress( user32,
"GetLayeredWindowAttributes" );
13537 pSetLayeredWindowAttributes = (
void *)
GetProcAddress( user32,
"SetLayeredWindowAttributes" );
13538 pUpdateLayeredWindow = (
void *)
GetProcAddress( user32,
"UpdateLayeredWindow" );
13539 pUpdateLayeredWindowIndirect = (
void *)
GetProcAddress( user32,
"UpdateLayeredWindowIndirect" );
13540 pGetWindowRgnBox = (
void *)
GetProcAddress( user32,
"GetWindowRgnBox" );
13541 pGetGUIThreadInfo = (
void *)
GetProcAddress( user32,
"GetGUIThreadInfo" );
13542 pGetProcessDefaultLayout = (
void *)
GetProcAddress( user32,
"GetProcessDefaultLayout" );
13543 pSetProcessDefaultLayout = (
void *)
GetProcAddress( user32,
"SetProcessDefaultLayout" );
13545 pFlashWindowEx = (
void *)
GetProcAddress( user32,
"FlashWindowEx" );
13547 pGetWindowDisplayAffinity = (
void *)
GetProcAddress( user32,
"GetWindowDisplayAffinity" );
13548 pSetWindowDisplayAffinity = (
void *)
GetProcAddress( user32,
"SetWindowDisplayAffinity" );
13549 pAdjustWindowRectExForDpi = (
void *)
GetProcAddress( user32,
"AdjustWindowRectExForDpi" );
13550 pSystemParametersInfoForDpi = (
void *)
GetProcAddress( user32,
"SystemParametersInfoForDpi" );
13551 pInternalGetWindowIcon = (
void *)
GetProcAddress( user32,
"InternalGetWindowIcon" );
13563 else if (!
strcmp(
argv[2],
"test_other_process_window"))
13587 100, 100, 200, 200,
13601 if (!
hhook)
win_skip(
"Cannot set CBT hook, skipping some tests\n" );
13611 100, 100, 200, 200,
static void startup(void)
VOID SetPixel(_In_ ULONG Left, _In_ ULONG Top, _In_ UCHAR Color)
static const char * wine_dbgstr_rect(const RECT *prc)
void user(int argc, const char *argv[])
#define UlongToHandle(ul)
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define ERROR_ACCESS_DENIED
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(const char *app_name, char *cmd_line, SECURITY_ATTRIBUTES *process_attr, SECURITY_ATTRIBUTES *thread_attr, BOOL inherit, DWORD flags, void *env, const char *cur_dir, STARTUPINFOA *startup_info, PROCESS_INFORMATION *info)
ULONG WINAPI DECLSPEC_HOTPATCH GetTickCount(void)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl sscanf(const char *, const char *,...) __WINE_CRT_SCANF_ATTR(2
_ACRTIMP int __cdecl strcmp(const char *, const char *)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static void test_window(IHTMLDocument2 *doc)
DWORD WINAPI GetLayout(_In_ HDC hdc)
DWORD WINAPI SetLayout(_In_ HDC hdc, _In_ DWORD dwLayout)
GLint GLint GLsizei GLsizei GLsizei GLint border
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLclampf GLclampf GLclampf alpha
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLdouble GLdouble GLint GLint order
GLenum GLenum GLenum input
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
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 * u
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 GLint GLint j
static const WCHAR titleW[]
const char * winetest_platform
#define todo_wine_if(is_todo)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
#define memcpy(s1, s2, n)
static struct test_info tests[]
DWORD WINAPI thread1(LPVOID crap)
DWORD WINAPI thread2(LPVOID crap)
static const BYTE bitmap_bits[48 *48/8]
static HANDLE start_event
static LRESULT WINAPI wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static IHTMLWindow2 * window
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
static void test_handles(void)
static void test_SetFocus(void)
static void test_SetForegroundWindow(void)
static void test_SetActiveWindow(void)
static void reset_window_state(HWND *state, int n)
static void test_set_window_long_size(void)
static void test_activateapp(HWND window1)
static INT_PTR WINAPI reparent_dlg_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static LRESULT WINAPI message_window_topmost_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_GetUpdateRect(void)
static BOOL test_thick_child_got_minmax
static void test_MDI_child_stack(HWND mdi_client)
static DWORD CALLBACK destroy_thread2(void *user)
static void test_cancel_mode(void)
static void test_destroy_quit(void)
static void test_dialog_parent(void)
static LRESULT WINAPI check_style_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static void nccalchelper(HWND hwnd, INT x, INT y, RECT *prc)
static LRESULT WINAPI destroy_dialog_owner_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
#define SET_FOREGROUND_SET_1
static ATOM atomStyleCheckClass
static void FixedAdjustWindowRectEx(RECT *rc, LONG style, BOOL menu, LONG exstyle)
static int window_to_index(HWND hwnd, HWND *window, int size)
static void window_from_point_proc(HWND parent)
static void test_smresult(void)
static void test_FindWindowEx(void)
static HWND message_window_topmost_hwnd_msg
static void create_window_tree(HWND parent, HWND *window, int size)
static void check_z_order_debug(HWND hwnd, HWND next, HWND prev, HWND owner, BOOL topmost, const char *file, int line)
static DWORD CALLBACK gettext_msg_thread(LPVOID arg)
static void test_ncdestroy(void)
static DWORD WINAPI smresult_thread_proc(void *param)
static void test_capture_1(void)
static DWORD CALLBACK settext_msg_thread(LPVOID arg)
static void test_AdjustWindowRect(void)
static void test_window_from_point(HWND main_window, const char *argv0)
static void check_dialog_style(DWORD style_in, DWORD ex_style_in, DWORD style_out, DWORD ex_style_out)
static void test_SC_SIZE(void)
static void test_nonclient_area(HWND hwnd)
#define check_icon_size(a, b, c)
static void test_window_without_child_style(void)
static LRESULT CALLBACK minmax_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
static void test_window_info(const char *hook, HWND hwnd)
static void other_process_proc(HWND hwnd)
static void test_gettext(void)
static BOOL mdi_RegisterWindowClasses(void)
static const WCHAR mainclassW[]
static void test_LockWindowUpdate(HWND parent)
static void test_layered_window(void)
static LRESULT CALLBACK fullscreen_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
static INT_PTR WINAPI empty_dlg_proc2(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void get_window_attributes(HWND hwnd, struct window_attributes *attrs)
static LRESULT WINAPI main_window_procW(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_validatergn(HWND hwnd)
static char mdi_lParam_test_message[]
static LRESULT WINAPI static_hook_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
static const char * szAWRClass
static void check_wnd_state_(const char *file, int line, HWND active, HWND foreground, HWND focus, HWND capture)
static void wine_AdjustWindowRectEx(RECT *rect, LONG style, BOOL menu, LONG exStyle)
static void run_NCRedrawLoop(UINT flags)
static void test_winregion(void)
static const char * test_thick_child_name
static void zero_parentdc_stat(struct parentdc_stat *t)
static COLORREF BYTE DWORD *static BYTE
static void test_message_window_topmost(void)
static void swp_after(HWND hwnd, HWND after)
static void test_winproc_handles(const char *argv0)
static LRESULT WINAPI winproc_convA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyleOut, DWORD dwExStyleOut)
static void test_SetParent(void)
static void test_scrolldc(HWND parent)
static LRESULT WINAPI smresult_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_SetWindowLong(void)
static void wine_AdjustWindowRectExForDpi(RECT *rect, LONG style, BOOL menu, LONG exStyle, UINT dpi)
static DWORD WINAPI internal_get_icon_thread(void *arg)
static void test_children_zorder(HWND parent)
static void test_set_window_word_size(void)
static DWORD WINAPI set_foreground_thread(void *params)
static DWORD WINAPI create_window_thread(void *param)
static void test_hide_window(void)
static BOOL app_activated
static LRESULT WINAPI parentdc_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static BOOL CALLBACK enum_proc(HWND hwnd, LPARAM lParam)
static WINDOWINFO *static LPSTR
static void test_keyboard_input(HWND hwnd)
static void simulate_click(int x, int y)
static LRESULT WINAPI ncdestroy_test_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
static BOOL AWR_init(void)
static void check_parents(HWND hwnd, HWND ga_parent, HWND gwl_parent, HWND get_parent, HWND gw_owner, HWND ga_root, HWND ga_root_owner)
static void test_thread_exit_destroy(void)
static BOOL app_deactivated
static WNDPROC old_button_proc
static void test_redrawnow(void)
static LRESULT WINAPI test_ReleaseCapture_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
void dump_region(HRGN hrgn)
static void test_Expose(void)
static INT_PTR WINAPI parent_dlg_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static LRESULT WINAPI winproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static DWORD num_gettext_msgs
#define check_active_state(a, b, c)
static LRESULT WINAPI def_window_procW(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_scrollwindow(HWND hwnd)
static INT_PTR WINAPI empty_dlg_proc3(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static LRESULT WINAPI StyleCheckProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_mdi(void)
static BOOL wait_for_message(MSG *msg)
static DWORD wait_for_events(DWORD count, HANDLE *events, DWORD timeout)
static LRESULT CALLBACK enable_window_procA(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static BOOL peek_message(MSG *msg)
static void register_style_check_class(void)
static void test_dialog_styles(void)
static void test_FlashWindowEx(void)
static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_GetWindowModuleFileName(void)
static void test_SetActiveWindow_0(char **argv)
static void verify_window_info(const char *hook, HWND hwnd, const WINDOWINFO *info)
static BOOL is_topmost(HWND hwnd)
static LRESULT WINAPI button_hook_proc(HWND button, UINT msg, WPARAM wparam, LPARAM lparam)
#define check_wnd_state(a, b, c, d)
static int redrawComplete
#define expect_style(window, style)
static void test_nccalcscroll(HWND parent)
static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
static void test_ReleaseCapture(void)
#define check_z_order(hwnd, next, prev, owner, topmost)
static void test_rtl_layout(void)
static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E, DWORD style)
static void check_icon_size_(int line, HICON icon, LONG width, LONG height)
static WNDPROC def_static_proc
static HWND create_tool_window(LONG style, HWND parent)
static void test_AWR_window_size(BOOL menu)
static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
static LRESULT WINAPI def_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static DWORD CALLBACK enum_thread(void *arg)
static COLORREF BYTE DWORD *static DWORD
static void test_SetWindowPos(HWND hwnd, HWND hwnd2)
static void test_enum_thread_windows(void)
static void test_deferwindowpos(void)
static void test_display_affinity(HWND win)
#define parentdc_ok(t, got)
static LONG test_thick_child_exStyle
static LRESULT WINAPI reparent_dialog_owner_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static LRESULT WINAPI nccalcsize_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_IsWindowEnabled(void)
static void test_capture_2(void)
static LRESULT WINAPI my_window_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
static void test_icons(void)
static LONG test_thick_child_style
static WINDOWINFO *static UINT
static void test_CreateWindow(void)
static BOOL CALLBACK EnumChildProc1(HWND hwndChild, LPARAM lParam)
static BOOL ignore_message(UINT message, HWND hwnd)
static void test_desktop(void)
static void test_IsWindowUnicode(void)
#define TEST_PIXEL(c_valid, c_invalid)
static BOOL test_lbuttondown_flag
static void test_WM_NCCALCSIZE(void)
static void test_GetLastActivePopup(void)
static INT_PTR WINAPI reparent_owned_dlg_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static RECT expected_rect
static void test_capture_3(HWND hwnd1, HWND hwnd2)
#define SET_FOREGROUND_STEAL_2
static void test_parent_owner(void)
static void test_scrollvalidate(HWND parent)
#define TRAY_MINIMIZE_ALL
static DWORD CALLBACK enablewindow_thread(LPVOID arg)
static const WCHAR textW[]
static void test_ShowWindow_child(HWND hwndMain)
static void test_child_window_from_point(void)
static void test_ShowWindow_mdichild(HWND hwndMain)
static LRESULT WINAPI redraw_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_window_placement(void)
#define SET_FOREGROUND_SET_2
static void test_mouse_input(HWND hwnd)
static void test_shell_tray(void)
static LRESULT WINAPI tool_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static LRESULT WINAPI winproc_convW(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static LRESULT WINAPI my_httrasparent_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
static void test_topmost(void)
static LRESULT CALLBACK test_capture_4_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
static void test_ShowWindow(void)
static void test_AWR_flags(void)
static void test_EnableWindow(void)
static const UPDATELAYEREDWINDOWINFO *static LPRECT
static LRESULT CALLBACK TestNCRedraw_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static void test_SetMenu(HWND parent)
#define TRAY_MINIMIZE_ALL_UNDO
static void test_minimize_window(HWND hwndMain)
static void test_params(void)
static BOOL do_release_capture
static LRESULT WINAPI destroy_thread2_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void hold_key(int vk)
#define SHOWSYSMETRIC(SM)
static void test_map_points(void)
static LRESULT CALLBACK TestExposedRegion_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
static LRESULT WINAPI post_quit_dialog_owner_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static COLORREF BYTE DWORD *static COLORREF
static void test_NCRedraw(void)
static void test_arrange_iconic_windows(void)
static DWORD WINAPI test_shell_window_thread(LPVOID param)
static void zero_parentdc_test(struct parentdc_test *t)
#define SET_FOREGROUND_INJECT
static int wm_mousemove_count
static BOOL message_window_topmost_received_killfocus
#define check_internal_icon_size(a, b, c, d)
static LRESULT WINAPI destroy_thread1_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static LRESULT WINAPI set_focus_on_activate_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
static LRESULT WINAPI cbt_proc(int ncode, WPARAM wparam, LPARAM lparam)
static void test_winproc_limit(void)
#define SET_FOREGROUND_STEAL_1
static void test_window_tree(HWND parent, const DWORD *style, const int *order, int total)
static void test_GetMessagePos(void)
static DWORD num_settext_msgs
static DWORD CALLBACK test_thread_exit_parent_thread(void *args)
static void test_shell_window(void)
#define NUMBER_OF_THICK_CHILD_TESTS
static BOOL RegisterWindowClasses(void)
static DWORD CALLBACK destroy_thread1(void *user)
static void test_ShowWindow_owned(HWND hwndMain)
static void test_other_process_window(const char *argv0)
static void MDI_ChildGetMinMaxInfo(HWND client, HWND hwnd, MINMAXINFO *lpMinMax)
static void test_thick_child_size(HWND parentWindow)
static void test_capture_4(void)
static void release_key(int vk)
static LRESULT CALLBACK test_standard_scrollbar_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
static void check_active_state_(const char *file, int line, HWND active, HWND foreground, HWND focus)
static void test_SetActiveWindow_0_proc(char **argv)
static void test_vis_rgn(HWND hwnd)
#define expect_menu(window, menu)
static void test_window_styles(void)
static void test_csparentdc(void)
static void test_FlashWindow(void)
static struct wm_gettext_override_data g_wm_gettext_override
static void test_hwnd_message(void)
static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
static void test_set_window_style(void)
static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam)
static void dump_minmax_info(const MINMAXINFO *minmax)
#define expect_ex_style(window, ex_style)
static void test_FindWindow(void)
static void test_update_region(void)
static LRESULT WINAPI destroy_main_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_AWRwindow(LPCSTR class, LONG style, LONG exStyle, BOOL menu)
static INT_PTR WINAPI empty_dlg_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_fullscreen(void)
static void test_DragDetect(void)
static void check_internal_icon_size_(int line, HANDLE window, UINT type, LONG width, LONG height)
static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static LRESULT CALLBACK test_thread_exit_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
static void test_scroll(void)
HMONITOR WINAPI MonitorFromPoint(POINT, DWORD)
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
#define WS_OVERLAPPEDWINDOW
#define WS_EX_DLGMODALFRAME
#define WS_EX_TRANSPARENT
struct _STARTUPINFOA STARTUPINFOA
static unsigned __int64 next
#define offsetof(TYPE, MEMBER)
int winetest_get_mainargs(char ***pargv)
#define wait_child_process
#define _WIN32_WINNT_WS03
#define _WIN32_WINNT_WIN8
static char argv0[MAX_PATH]
struct parentdc_stat child2 child2_todo
struct parentdc_stat child1 child1_todo
struct parentdc_stat main main_todo
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenEventA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
__inline int after(__u32 seq1, __u32 seq2)
static IsThemeActiveT pIsThemeActive
TW_UINT32 TW_UINT16 TW_UINT16 MSG
BOOL WINAPI SetShellWindow(HWND)
static const WCHAR classW[]
HDESK WINAPI CreateDesktopA(LPCSTR lpszDesktop, LPCSTR lpszDevice, LPDEVMODEA pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa)
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
#define success(from, fromstr, to, tostr)
struct tagGUITHREADINFO GUITHREADINFO
UINT WINAPI SendInput(UINT, LPINPUT, int)
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentThreadId(void)
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
#define ERROR_TLW_WITH_WSCHILD
#define ERROR_INVALID_INDEX
#define ERROR_INVALID_DWP_HANDLE
#define ERROR_INVALID_MENU_HANDLE
#define ERROR_INVALID_WINDOW_HANDLE
#define ERROR_CLASS_DOES_NOT_EXIST
#define ERROR_CANNOT_FIND_WND_CLASS
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
int WINAPI GetClipBox(_In_ HDC, _Out_ LPRECT)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI TextOutA(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(c) LPCSTR lpString, _In_ int c)
BOOL WINAPI EqualRgn(_In_ HRGN, _In_ HRGN)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
int WINAPI GetRandomRgn(_In_ HDC, _In_ HRGN, _In_ INT)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HRGN WINAPI CreateRectRgnIndirect(_In_ LPCRECT)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)
BOOL WINAPI SetRectRgn(_In_ HRGN, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI GetRgnBox(_In_ HRGN, _Out_ LPRECT)
HWND WINAPI GetFocus(void)
HWND WINAPI SetCapture(_In_ HWND hWnd)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
LRESULT WINAPI DefFrameProcA(_In_ HWND, _In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SetWindowLongPtrA
BOOL WINAPI IsWindow(_In_opt_ HWND)
HWND WINAPI GetActiveWindow(void)
HMENU WINAPI CreatePopupMenu(void)
LRESULT WINAPI DefMDIChildProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetMenu(_In_ HWND, _In_opt_ HMENU)
#define SM_CYVIRTUALSCREEN
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
void WINAPI mouse_event(_In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ ULONG_PTR)
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
#define GetWindowLongPtrW
BOOL WINAPI SetKeyboardState(_In_reads_(256) LPBYTE)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR 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)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI ReleaseCapture(void)
DWORD WINAPI GetMessagePos(void)
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
HWND WINAPI GetForegroundWindow(void)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
#define MOUSEEVENTF_LEFTUP
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL)
UINT WINAPI ArrangeIconicWindows(_In_ HWND)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetThreadDesktop(_In_ HDESK)
HICON WINAPI CreateIcon(_In_opt_ HINSTANCE, _In_ int, _In_ int, _In_ BYTE, _In_ BYTE, _In_ const BYTE *, _In_ const BYTE *)
BOOL WINAPI GetIconInfo(_In_ HICON, _Out_ PICONINFO)
#define WM_CAPTURECHANGED
#define WM_WINDOWPOSCHANGING
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
#define SW_SCROLLCHILDREN
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI GetLastActivePopup(_In_ HWND)
LONG WINAPI SetWindowLongA(_In_ HWND, _In_ int, _In_ LONG)
HHOOK WINAPI SetWindowsHookExW(_In_ int, _In_ HOOKPROC, _In_opt_ HINSTANCE, _In_ DWORD)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WS_EX_CONTROLPARENT
struct tagWINDOWINFO WINDOWINFO
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
int WINAPI SetWindowRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
int WINAPI GetClassNameA(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPSTR lpClassName, _In_ int nMaxCount)
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
HMENU WINAPI CreateMenu(void)
BOOL WINAPI ValidateRect(_In_opt_ HWND, _In_opt_ LPCRECT)
struct tagCREATESTRUCTA * LPCREATESTRUCTA
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SW_SHOWNOACTIVATE
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
HWND WINAPI CreateMDIWindowA(_In_ LPCSTR, _In_ LPCSTR, _In_ DWORD, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HWND, _In_opt_ HINSTANCE, _In_ LPARAM)
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
HWND WINAPI GetCapture(void)
BOOL WINAPI IsMenu(_In_ HMENU)
#define GetWindowLongPtrA
_Check_return_ BOOL WINAPI GetKeyboardState(_Out_writes_(256) PBYTE lpKeyState)
HWND WINAPI FindWindowExA(_In_opt_ HWND, _In_opt_ HWND, _In_opt_ LPCSTR, _In_opt_ LPCSTR)
WORD WINAPI SetWindowWord(_In_ HWND, _In_ int, _In_ WORD)
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define SWP_ASYNCWINDOWPOS
BOOL WINAPI SetCursorPos(_In_ int, _In_ int)
BOOL WINAPI EnumChildWindows(_In_opt_ HWND, _In_ WNDENUMPROC, _In_ LPARAM)
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
BOOL WINAPI IsIconic(_In_ HWND)
#define MDIS_ALLCHILDSTYLES
BOOL WINAPI GetScrollRange(_In_ HWND, _In_ int, _Out_ LPINT, _Out_ LPINT)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
HHOOK WINAPI SetWindowsHookExA(_In_ int, _In_ HOOKPROC, _In_opt_ HINSTANCE, _In_ DWORD)
HWND WINAPI GetDesktopWindow(void)
#define SM_CXVIRTUALSCREEN
BOOL WINAPI IsWindowUnicode(_In_ HWND)
#define MOUSEEVENTF_LEFTDOWN
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
ATOM WINAPI RegisterClassExA(_In_ CONST WNDCLASSEXA *)
BOOL WINAPI SendNotifyMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI LockWindowUpdate(_In_opt_ HWND)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)
HWND WINAPI SetActiveWindow(_In_ HWND)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI PostThreadMessageW(_In_ DWORD, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
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)
HWND WINAPI CreateDialogIndirectParamA(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HICON WINAPI LoadIconA(_In_opt_ HINSTANCE hInstance, _In_ LPCSTR lpIconName)
BOOL WINAPI ScrollDC(_In_ HDC, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT)
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
int WINAPI GetUpdateRgn(_In_ HWND, _In_ HRGN, _In_ BOOL)
BOOL WINAPI UpdateWindow(_In_ HWND)
BOOL WINAPI GetMonitorInfoA(_In_ HMONITOR, _Inout_ LPMONITORINFO)
BOOL WINAPI ValidateRgn(_In_ HWND, _In_opt_ HRGN)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
BOOL WINAPI DragDetect(_In_ HWND, _In_ POINT)
HDC WINAPI GetDC(_In_opt_ HWND)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI AppendMenuA(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCSTR)
VOID WINAPI keybd_event(_In_ BYTE, _In_ BYTE, _In_ DWORD, _In_ ULONG_PTR)
BOOL WINAPI GetClassInfoA(_In_opt_ HINSTANCE, _In_ LPCSTR, _Out_ LPWNDCLASSA)
INT_PTR WINAPI DialogBoxIndirectParamA(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
BOOL WINAPI IsWindowEnabled(_In_ HWND)
HWND WINAPI GetParent(_In_ HWND)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
BOOL WINAPI DestroyMenu(_In_ HMENU)
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
#define DCX_LOCKWINDOWUPDATE
int WINAPI GetClassNameW(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPWSTR lpClassName, _In_ int nMaxCount)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
#define WPF_RESTORETOMAXIMIZED
HWND WINAPI WindowFromPoint(_In_ POINT)
#define SWP_NOOWNERZORDER
BOOL WINAPI SystemParametersInfoA(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
WORD WINAPI GetWindowWord(_In_ HWND, _In_ int)
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
DWORD WINAPI GetClassLongA(_In_ HWND, _In_ int)
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
HWND WINAPI RealChildWindowFromPoint(_In_ HWND, _In_ POINT)
#define WS_EX_LEFTSCROLLBAR
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
#define SM_XVIRTUALSCREEN
BOOL WINAPI CloseDesktop(_In_ HDESK)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
BOOL WINAPI PostThreadMessageA(_In_ DWORD, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
BOOL WINAPI EnumThreadWindows(_In_ DWORD, _In_ WNDENUMPROC, _In_ LPARAM)
BOOL WINAPI GetClassInfoW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSW)
INT WINAPI InternalGetWindowText(_In_ HWND hWnd, _Out_writes_to_(cchMaxCount, return+1) LPWSTR pString, _In_ int cchMaxCount)
#define SetWindowLongPtrW
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
BOOL WINAPI GetUpdateRect(_In_ HWND, _Out_opt_ LPRECT, _In_ BOOL)
BOOL WINAPI SetWindowPlacement(_In_ HWND hWnd, _In_ const WINDOWPLACEMENT *)
HWND WINAPI FindWindowA(_In_opt_ LPCSTR, _In_opt_ LPCSTR)
#define WM_WINDOWPOSCHANGED
#define SWP_NOSENDCHANGING
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WPF_SETMINPOSITION
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
int WINAPI GetSystemMetrics(_In_ int)
HWND WINAPI GetAncestor(_In_ HWND, _In_ UINT)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WS_EX_NOINHERITLAYOUT
HWND WINAPI CreateMDIWindowW(_In_ LPCWSTR, _In_ LPCWSTR, _In_ DWORD, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HWND, _In_opt_ HINSTANCE, _In_ LPARAM)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SM_YVIRTUALSCREEN
HMENU WINAPI GetMenu(_In_ HWND)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
SHORT WINAPI GetKeyState(_In_ int)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
HDWP WINAPI BeginDeferWindowPos(_In_ int)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)