39#define MDI_FIRST_CHILD_ID 2004
42#define SWP_NOCLIENTSIZE 0x0800
43#define SWP_NOCLIENTMOVE 0x1000
44#define SWP_STATECHANGED 0x8000
46#define SW_NORMALNA 0xCC
49#define WM_KEYF1 0x004d
53#define WM_SYSTIMER 0x0118
56#define WND_PARENT_ID 1
60#ifndef WM_LBTRACKPOINT
61#define WM_LBTRACKPOINT 0x0131
66#elif defined __aarch64__ || defined__arm64ec__
68#elif defined __x86_64__
125{
'T',
'e',
's',
't',
'W',
'i',
'n',
'd',
'o',
'w',
'C',
'l',
'a',
's',
's',
'W',0 };
132 ok(
ret,
"Failed to register class %s, error %lu.\n",
1100 { WM_STYLECHANGING,
sent },
1101 { WM_STYLECHANGED,
sent },
2053 { SBM_GETSCROLLINFO,
sent },
2061 { SBM_SETSCROLLINFO,
sent },
2359#define GET_PROC(dll, func) \
2360 p ## func = (void*)GetProcAddress(dll, #func); \
2362 trace("GetProcAddress(%s) failed\n", #func); \
2372 GET_PROC(user32, SetCoalescableTimer)
2384#define DUMP(flag) do { if (flags & flag) { strcat( buffer, "|" #flag ); flags &= ~flag; } } while(0)
2412 message == WM_DISPLAYCHANGE ||
2423 hash =
hash * 1664525u + (
unsigned char)(*str) + 1013904223u;
2433 hash =
hash * 1664525u + (
unsigned char)(*str) + 1013904223u;
2438#define add_message(msg) add_message_(__LINE__,msg);
2470 static const char *
const CBT_code_name[10] =
2478 "HCBT_CLICKSKIPPED",
2483 const char *code_name = (
msg->message <=
HCBT_SETFOCUS) ? CBT_code_name[
msg->message] :
"Unknown";
2486 msg->descr,
msg->message, code_name,
msg->wParam,
msg->lParam );
2495 switch (
msg->message)
2502 sprintf( seq->
output,
"%s: %p WM_WINDOWPOS%s wp %08Ix lp %08Ix after %p x %d y %d cx %d cy %d flags %s",
2506 winpos->
x, winpos->
y, winpos->
cx, winpos->
cy,
2514 seq->
wParam &= ~SWP_NOZORDER;
2515 seq->
lParam = (!!winpos->
cx) | ((!!winpos->
cy) << 1)
2516 | ((!!winpos->
x) << 2) | ((!!winpos->
y) << 3);
2526 sprintf(seq->
output,
"%s: %p WM_NCCALCSIZE: winpos->cx %u, winpos->cy %u",
2527 msg->descr,
msg->hwnd, winpos->cx, winpos->cy);
2528 seq->
lParam = (!!winpos->cx) | ((!!winpos->cy) << 1)
2529 | ((!!winpos->x) << 2) | ((!!winpos->y) << 3);
2545 sprintf( seq->
output,
"%s: %p WM_DRAWITEM: type %x, ctl_id %x, item_id %x, action %x, state %x",
2569 sprintf( seq->
output,
"%s: %p WM_MEASUREITEM: CtlType %#x, CtlID %#x, itemID %#x, itemData %#Ix",
2583 mi.u.item.wParam =
msg->wParam;
2585 if (is_unicode_data)
2603 sprintf( seq->
output,
"%s: %p WM_COMPAREITEM: CtlType %#x, CtlID %#x, itemID1 %#x, itemData1 %#Ix, itemID2 %#x, itemData2 %#Ix",
2610 if (is_unicode_data)
2624 if (
msg->message >= 0xc000)
return;
2639 int min_timeout = 100;
2687 static int todo_reported;
2690 expect_equal =
FALSE;
2699 if (expect_equal && (!
todo || !todo_reported++))
2701 ok_(
file,
line) (msg_wine_only,
"the msg sequence is not complete: expected %s %04x - actual %s %04x\n",
2707 (
expected->flags & message_type_flags) != (actual->
flags & message_type_flags))
2709 if (expect_equal && (!
todo || !todo_reported++))
2711 ok_(
file,
line) (msg_wine_only,
"the %s 0x%04x was expected, but got %s 0x%04x instead\n",
2728 ok_(
file,
line) (!msg_wine_only,
"got %s 0x%04x as expected\n",
2748 unsigned int count = 0;
2798#define ok_sequence( exp, contx, todo) \
2799 ok_sequence_( (exp), (contx), (todo), __FILE__, __LINE__)
2808 int failcount = 0,
dump = 0;
2809 unsigned int count = 0;
2830 "in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n",
2833 if (is_wine)
goto done;
2838 "in msg 0x%04x expecting wParam 0x%Ix got 0x%Ix\n",
2852 "in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n",
2855 if (is_wine)
goto done;
2860 "in msg 0x%04x expecting lParam 0x%Ix got 0x%Ix\n",
2871 "the msg 0x%04x should %shave been sent by DefWindowProc\n",
2874 if (is_wine)
goto done;
2879 "the msg 0x%04x should %shave been sent by DefWindowProc\n",
2885 "the msg 0x%04x should %shave been sent by BeginPaint\n",
2890 "the msg 0x%04x should have been %s\n",
2895 "the msg 0x%04x was expected in %s\n",
2950 if (is_wine && !failcount)
2971#define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %ld\n", (EXPECTED), (GOT))
4060 msg.descr =
"mdi client";
4069 static LONG defwndproc_counter = 0;
4104 msg.descr =
"mdi child";
4108 defwndproc_counter++;
4110 defwndproc_counter--;
4117 static LONG defwndproc_counter = 0;
4136 msg.descr =
"mdi frame";
4140 defwndproc_counter++;
4142 defwndproc_counter--;
4181 HWND mdi_frame, mdi_child, mdi_child2, active_child;
4198 ok(!!mdi_frame,
"Failed to create window, error %lu.\n",
GetLastError());
4218 ok(
GetFocus() == mdi_frame,
"input focus should be on MDI frame not on %p\n",
GetFocus());
4221 ok(!active_child,
"wrong active MDI child %p\n", active_child);
4222 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4232 ok(!!mdi_child,
"Failed to create window, error %lu.\n",
GetLastError());
4245 ok(!active_child,
"wrong active MDI child %p\n", active_child);
4246 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4262 ok(!active_child,
"wrong active MDI child %p\n", active_child);
4263 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4273 ok(!!mdi_child,
"Failed to create window, error %lu.\n",
GetLastError());
4283 ok(active_child == mdi_child,
"wrong active MDI child %p\n", active_child);
4284 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4297 ok(active_child == mdi_child ||
4299 "wrong active MDI child %p\n", active_child);
4300 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4309 ok(!!mdi_child2,
"Failed to create window, error %lu.\n",
GetLastError());
4322 ok(active_child == mdi_child ||
4323 active_child == mdi_child2,
4324 "wrong active MDI child %p\n", active_child);
4325 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4335 ok(active_child == mdi_child2,
"wrong active MDI child %p\n", active_child);
4336 ok(zoomed,
"wrong zoomed state %d\n", zoomed);
4342 "wrong focus window %p\n",
GetFocus());
4358 ok(active_child == mdi_child2,
"wrong active MDI child %p\n", active_child);
4359 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4393 ok(active_child == mdi_child2,
"wrong active MDI child %p\n", active_child);
4394 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4404 ok(active_child == mdi_child2,
"wrong active MDI child %p\n", active_child);
4405 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4436 ok(active_child == mdi_child2,
"wrong active MDI child %p\n", active_child);
4437 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4444 ok(active_child == mdi_child2,
"wrong active MDI child %p\n", active_child);
4445 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4451 ok(active_child == mdi_child2,
"wrong active MDI child %p\n", active_child);
4452 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4459 ok(active_child == mdi_child,
"wrong active MDI child %p\n", active_child);
4460 ok(!zoomed,
"wrong zoomed state %d\n", zoomed);
4473 ok(!!mdi_child,
"Failed to create window, error %lu.\n",
GetLastError());
4475 ok(
IsZoomed(mdi_child),
"1st MDI child should be maximized\n");
4480 "wrong focus window %p\n",
GetFocus());
4483 ok(active_child == mdi_child,
"wrong active MDI child %p\n", active_child);
4484 ok(zoomed,
"wrong zoomed state %d\n", zoomed);
4492 ok(!!mdi_child2,
"Failed to create window, error %lu.\n",
GetLastError());
4494 ok(
IsZoomed(mdi_child2),
"2nd MDI child should be maximized\n");
4495 ok(!
IsZoomed(mdi_child),
"1st MDI child should NOT be maximized\n");
4501 ok(active_child == mdi_child2,
"wrong active MDI child %p\n", active_child);
4502 ok(zoomed,
"wrong zoomed state %d\n", zoomed);
4509 ok(!
IsZoomed(mdi_child),
"1st MDI child should NOT be maximized\n");
4518 ok(active_child == mdi_child2 ||
4520 "wrong active MDI child %p\n", active_child);
4524 ok(
IsZoomed(mdi_child),
"1st MDI child should be maximized\n");
4535 ok(!!mdi_child2,
"Failed to create window, error %lu.\n",
GetLastError());
4537 ok(
IsZoomed(mdi_child2),
"2nd MDI child should be maximized\n");
4538 ok(!
IsZoomed(mdi_child),
"1st MDI child should NOT be maximized\n");
4544 ok(active_child == mdi_child2,
"wrong active MDI child %p\n", active_child);
4545 ok(zoomed,
"wrong zoomed state %d\n", zoomed);
4550 ok(!
IsWindow(mdi_child2),
"MDI child 2 should be destroyed\n");
4552 ok(
IsZoomed(mdi_child),
"1st MDI child should be maximized\n");
4557 ok(active_child == mdi_child,
"wrong active MDI child %p\n", active_child);
4558 ok(zoomed,
"wrong zoomed state %d\n", zoomed);
4571 ok(active_child == mdi_child ||
4573 "wrong active MDI child %p\n", active_child);
4581 ok(!!mdi_child2,
"Failed to create window, error %lu.\n",
GetLastError());
4586 ok(
IsZoomed(mdi_child2),
"MDI child should be maximized\n");
4594 ok(active_child == mdi_child ||
4595 !active_child || active_child == mdi_child2,
4596 "wrong active MDI child %p\n", active_child);
4602 ok(
IsZoomed(mdi_child2),
"MDI child should be maximized\n");
4607 ok(active_child == mdi_child2,
"wrong active MDI child %p\n", active_child);
4608 ok(zoomed,
"wrong zoomed state %d\n", zoomed);
4617 if (
winetest_debug > 1)
trace(
"creating maximized visible MDI child window 1(Switch test)\n");
4622 ok(!!mdi_child,
"Failed to create window, error %lu.\n",
GetLastError());
4624 ok(
IsZoomed(mdi_child),
"1st MDI child should be maximized(Switch test)\n");
4629 "wrong focus window %p(Switch test)\n",
GetFocus());
4632 ok(active_child == mdi_child,
"wrong active MDI child %p(Switch test)\n", active_child);
4633 ok(zoomed,
"wrong zoomed state %d(Switch test)\n", zoomed);
4636 if (
winetest_debug > 1)
trace(
"creating maximized visible MDI child window 2(Switch test)\n");
4641 ok(!!mdi_child2,
"Failed to create window, error %lu.\n",
GetLastError());
4644 ok(
IsZoomed(mdi_child2),
"2nd MDI child should be maximized(Switch test)\n");
4645 ok(!
IsZoomed(mdi_child),
"1st MDI child should NOT be maximized(Switch test)\n");
4651 ok(active_child == mdi_child2,
"wrong active MDI child %p(Switch test)\n", active_child);
4652 ok(zoomed,
"wrong zoomed state %d(Switch test)\n", zoomed);
4663 ok(!
IsZoomed(mdi_child),
"wrong zoomed state for %p(Switch test)\n", mdi_child);
4664 ok(!
IsZoomed(mdi_child2),
"wrong zoomed state for %p(Switch test)\n", mdi_child2);
4666 ok(active_child == mdi_child,
"wrong active MDI child %p(Switch test)\n", active_child);
4684 mdi_cs.
szClass =
"MDI_child_Class";
4694 ok(mdi_child != 0,
"MDI child creation failed\n");
4700 ok(active_child == mdi_child,
"wrong active MDI child %p\n", active_child);
4702 ok(
IsZoomed(mdi_child),
"MDI child should be maximized\n");
4707 ok(active_child == mdi_child,
"wrong active MDI child %p\n", active_child);
4708 ok(zoomed,
"wrong zoomed state %d\n", zoomed);
4714 ok(!
IsWindow(mdi_child),
"MDI child should be destroyed\n");
4716 ok(!active_child,
"wrong active MDI child %p\n", active_child);
4722 ok(
val == 0xdeadbeef ||
broken(
val == 0) ,
"Expected 0xdeadbeef, got 0x%lx\n",
val);
4747 ok(zoomed,
"wrong zoomed state %d\n", zoomed);
4815 msg.descr =
"dialog";
4846 msg.descr =
"dialog";
4864 if (clear)
ok(
style & clear,
"style %08lx should be set\n", clear);
4876 if (clear)
ok(!(
style & clear),
"style %08lx should not be set\n", clear);
4888 ok(xmin ==
min,
"unexpected min scroll value %d\n", xmin);
4889 ok(xmax ==
max,
"unexpected max scroll value %d\n", xmax);
4903 if (clear)
ok(
style & clear,
"style %08lx should be set\n", clear);
4906 si.cbSize =
sizeof(
si);
4918 if (clear)
ok(!(
style & clear),
"style %08lx should not be set\n", clear);
4940 si.nMin = 0xdeadbeef;
4941 si.nMax = 0xdeadbeef;
4945 ok(
si.nMin ==
min,
"unexpected min scroll value %d\n",
si.nMin);
4946 ok(
si.nMax ==
max,
"unexpected max scroll value %d\n",
si.nMax);
4964 trace(
"GetScrollRange(SB_CTL) generated unknown message %04x\n",
sequence->message);
4971 trace(
"SetScrollRange(SB_CTL) generated unknown message %04x\n",
sequence->message);
4979 trace(
"GetScrollRange(SB_CTL) generated unknown message %04x\n",
sequence->message);
4983 si.cbSize =
sizeof(
si);
4989 trace(
"SetScrollInfo(SB_CTL) generated unknown message %04x\n",
sequence->message);
4996 trace(
"SetScrollInfo(SB_CTL) generated unknown message %04x\n",
sequence->message);
5003 trace(
"SetScrollInfo(SB_CTL) generated unknown message %04x\n",
sequence->message);
5007 si.nMin = 0xdeadbeef;
5008 si.nMax = 0xdeadbeef;
5012 trace(
"GetScrollInfo(SB_CTL) generated unknown message %04x\n",
sequence->message);
5043 100, 100, 200, 200, 0, 0, 0,
NULL);
5044 ok (
hwnd != 0,
"Failed to create overlapped window\n");
5047 ok (hchild != 0,
"Failed to create child\n");
5051 if (
winetest_debug > 1)
trace(
"calling ShowWindow( SW_SHOWNA) for invisible top level window\n");
5056 if (
winetest_debug > 1)
trace(
"calling ShowWindow( SW_SHOWNA) for now visible top level window\n");
5064 if (
winetest_debug > 1)
trace(
"calling ShowWindow( SW_SHOWNA) for invisible child with invisible parent\n");
5070 if (
winetest_debug > 1)
trace(
"calling ShowWindow( SW_SHOWNA) for the visible child and invisible parent\n");
5076 if (
winetest_debug > 1)
trace(
"calling ShowWindow( SW_SHOWNA) for the visible child and parent\n");
5083 if (
winetest_debug > 1)
trace(
"calling ShowWindow( SW_SHOWNA) for the invisible child and visible parent\n");
5101 if (
winetest_debug > 1)
trace(
"calling CreateWindowExA( WS_MAXIMIZE ) for invisible maximized popup window\n");
5103 100, 100, 200, 200, 0, 0, 0,
NULL);
5104 ok (
hwnd != 0,
"Failed to create popup window\n");
5117 if (
winetest_debug > 1)
trace(
"calling ShowWindow( SW_SHOWMAXIMIZE ) for invisible maximized popup window\n");
5133 if (
winetest_debug > 1)
trace(
"calling CreateWindowExA( WS_MAXIMIZE ) for invisible maximized popup window\n");
5135 100, 100, 200, 200, 0, 0, 0,
NULL);
5136 ok (
hwnd != 0,
"Failed to create popup window\n");
5140 if (
winetest_debug > 1)
trace(
"calling ShowWindow( SW_SHOWMAXIMIZE ) for invisible maximized popup window\n");
5150 if (
winetest_debug > 1)
trace(
"calling CreateWindowExA( WS_MAXIMIZE ) for maximized popup window\n");
5152 100, 100, 200, 200, 0, 0, 0,
NULL);
5153 ok (
hwnd != 0,
"Failed to create popup window\n");
5163 if (
winetest_debug > 1)
trace(
"calling CreateWindowExA( WS_VISIBLE ) for popup window\n");
5165 100, 100, 200, 200, 0, 0, 0,
NULL);
5166 ok (
hwnd != 0,
"Failed to create popup window\n");
5170 if (
winetest_debug > 1)
trace(
"calling ShowWindow( SW_SHOWMAXIMIZE ) for visible popup window\n");
5180 hwnd =
CreateWindowA(
"TestWindowClass",
"window1",
WS_VISIBLE |
WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, 0, 0, 0, 0);
5181 ok(
hwnd !=
NULL,
"Failed to create window\n");
5183 hwnd2 =
CreateWindowA(
"static",
"window2",
WS_VISIBLE |
WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, 0, 0, 0, 0);
5184 ok(hwnd2 !=
NULL,
"Failed to create window\n");
5194 "ShowWindow(hwnd, SW_RESTORE): minimized overlapped",
TRUE);
5207 "ShowWindow(hwnd, SW_SHOWNOACTIVATE): minimized overlapped",
TRUE);
5216 hwnd =
CreateWindowA(
"TestWindowClass",
"parent",
WS_VISIBLE |
WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, 0, 0, 0, 0);
5217 ok(
hwnd !=
NULL,
"Failed to create window\n");
5227 "ShowWindow(hwnd, SW_RESTORE): active minimized overlapped",
TRUE);
5240 "ShowWindow(hwnd, SW_SHOWNOACTIVATE): active minimized overlapped",
TRUE);
5253 100, 100, 200, 200, 0, 0, 0,
NULL);
5254 ok (
hwnd != 0,
"Failed to create overlapped window\n");
5263 ok(
state != 0xffffffff,
"wrong SC_CLOSE state %x\n",
state);
5270 ok(
state != 0xffffffff,
"wrong SC_CLOSE state %x\n",
state);
5277 ok(
state != 0xffffffff,
"wrong SC_CLOSE state %x\n",
state);
5291 100, 100, 200, 200, 0, 0, 0,
NULL);
5292 ok (
hwnd != 0,
"Failed to create overlapped window\n");
5298 ok(
state == 0xffffffff,
"wrong SC_CLOSE state %x\n",
state);
5304 100, 100, 200, 200, 0, 0, 0,
NULL);
5305 ok(
hwnd != 0,
"Failed to create overlapped window\n");
5315 { WM_SETICON,
sent },
5324 { WM_SETICON,
sent },
5417 ok(
msg.message ==
WM_USER,
"got %04x instead of WM_USER\n",
msg.message);
5428 ok(
msg.message ==
WM_USER,
"got %04x instead of WM_USER\n",
msg.message);
5441 ok(
msg.message ==
WM_USER,
"got %04x instead of WM_USER\n",
msg.message);
5443 ok(
msg.message ==
WM_USER,
"got %04x instead of WM_USER\n",
msg.message);
5448 ok(
msg.message ==
WM_USER,
"got %04x instead of WM_USER\n",
msg.message);
5454 ok(
msg.message ==
WM_USER,
"got %04x instead of WM_USER\n",
msg.message);
5470 ok(
msg.message ==
WM_USER,
"got %04x instead of WM_USER\n",
msg.message);
5482 static const WPARAM wparams[] = {0,
5502 if (wparams[
i] & 0x8000)
5539#define test_msg_setpos( expected_list, flags, todo ) \
5540 test_msg_setpos_( (expected_list), (flags), (todo), __FILE__, __LINE__)
5548 10, 10, 100, 100,
NULL, 0, 0,
NULL );
5549 ok (
hwnd != 0,
"Failed to create popup window\n");
5561 HWND hchild2, hbutton;
5571 100, 100, 200, 200, 0, 0, 0,
NULL);
5572 ok (
hwnd != 0,
"Failed to create overlapped window\n");
5695 10, 10, 100, 100,
NULL, 0, 0,
NULL );
5696 ok (
hwnd != 0,
"Failed to create popup window\n");
5705 10, 10, 100, 100,
NULL, 0, 0,
NULL );
5706 ok (
hwnd != 0,
"Failed to create popup window\n");
5716 10, 10, 100, 100,
NULL, 0, 0,
NULL );
5717 ok (
hwnd != 0,
"Failed to create popup window\n");
5759 100, 100, 200, 200, 0, 0, 0,
NULL);
5760 ok (hparent != 0,
"Failed to create parent window\n");
5763 0, 0, 10, 10, hparent, 0, 0,
NULL);
5764 ok (hchild != 0,
"Failed to create child window\n");
5768 "SetWindowPos:show_popup_first_show_window_child1",
FALSE);
5774 100, 100, 200, 200, 0, 0, 0,
NULL);
5775 ok (hparent != 0,
"Failed to create parent window\n");
5778 0, 0, 10, 10, hparent, 0, 0,
NULL);
5779 ok (hchild != 0,
"Failed to create child window\n");
5783 "SetWindowPos:show_popup_first_show_window_child2",
FALSE);
5791 -10, -10, 10000, 10000,
NULL, 0, 0,
NULL );
5792 ok (
hwnd != 0,
"Failed to create popup window\n");
5800 100, 100, 200, 200, 0, 0, 0,
NULL);
5801 ok (hparent != 0,
"Failed to create parent window\n");
5805 0, 0, 10, 10, hparent, 0, 0,
NULL);
5806 ok (hchild != 0,
"Failed to create child window\n");
5814 0, 0, 10, 10, hparent, 0, 0,
NULL);
5815 ok (hchild != 0,
"Failed to create child window\n");
5821 if (
winetest_debug > 1)
trace(
"testing scroll APIs on a visible child window %p\n", hchild);
5831 0, 0, 10, 10, hparent, 0, 0,
NULL);
5832 ok (hchild != 0,
"Failed to create child window\n");
5836 100, 100, 50, 50, hparent, 0, 0,
NULL);
5837 ok (hchild2 != 0,
"Failed to create child2 window\n");
5841 0, 100, 50, 50, hchild, 0, 0,
NULL);
5842 ok (hbutton != 0,
"Failed to create button window\n");
5894 0, 0, 100, 100, hparent, 0, 0,
NULL);
5895 ok (hchild != 0,
"Failed to create child popup window\n");
5902 0, 0, 100, 100, hparent, 0, 0,
NULL);
5903 ok (hchild != 0,
"Failed to create popup window\n");
5923 0, 0, 100, 100, hparent, 0, 0,
NULL);
5924 ok (hchild != 0,
"Failed to create popup window\n");
5938 0, 0, 100, 100, hparent, 0, 0,
NULL);
5939 ok(
hwnd != 0,
"Failed to create custom dialog window\n");
5966 ok(
hwnd != 0,
"Failed to create custom dialog window\n");
5984 ok(
hwnd != 0,
"Failed to create custom dialog window\n");
6002 ok(!
DrawMenuBar(
hwnd),
"DrawMenuBar should return FALSE for a destroyed window\n");
6007 ok (
hmenu != 0,
"Failed to create menu\n");
6037 100, 100, 200, 200, 0, 0, 0,
NULL);
6038 ok (hparent != 0,
"Failed to create parent window\n");
6040 0, 0, 10, 10, hparent, 0, 0,
NULL);
6041 ok (hchild != 0,
"Failed to create child window\n");
6080 ok(
msg.message ==
WM_USER+1,
"got %x instead of WM_USER+1\n",
msg.message );
6130 ok(
res == 1,
"SendMessage(hwnd, 0x3B, 0x8000000b, 0) should have returned 1 instead of %Id\n",
res);
6133 ok(
res == 1,
"SendMessage(hwnd, 0x3B, 0x0000000b, 0) should have returned 1 instead of %Id\n",
res);
6136 ok(
res == 1,
"SendMessage(hwnd, 0x3B, 0x0000000f, 0) should have returned 1 instead of %Id\n",
res);
6141 ok(
res == 2,
"SendMessage(hwnd, 0x3B, 0x80000008, 0) should have returned 2 instead of %Id\n",
res);
6144 ok(
res == 2,
"SendMessage(hwnd, 0x3B, 0x00000008, 0) should have returned 2 instead of %Id\n",
res);
6148 ok(
res == 2,
"SendMessage(hwnd, 0x3B, 0x80000004, 0) should have returned 2 instead of %Id\n",
res);
6152 ok(
res == 2,
"SendMessage(hwnd, 0x3B, 0x80000001, 0) should have returned 2 instead of %Id\n",
res);
6220 const INT winX = 100;
6221 const INT winY = 100;
6225 X,
Y, winX, winY, 0,
6236 ok(
res ==
TRUE,
"SetWindowPos expected TRUE, got %Id\n",
res);
6245 ok(
res ==
TRUE,
"SetWindowPos expected TRUE, got %Id.\n",
res);
6255 ok(
res ==
TRUE,
"SetWindowPos expected TRUE, got %Id.\n",
res);
6263 ok(
res ==
TRUE,
"SetWindowPos expected TRUE, got %Id.\n",
res);
6276 ok(
res ==
TRUE,
"SetWindowPos expected TRUE, got %Id.\n",
res);
6281 ok(
res ==
TRUE,
"SetWindowPos expected TRUE, got %Id.\n",
res);
6291 HWND hparent, hchild;
6294 100, 100, 200, 200, 0, 0, 0,
NULL);
6295 ok (hparent != 0,
"Failed to create parent window\n");
6301 0, 0, 10, 10, hparent, 0, 0,
NULL);
6302 ok (hchild != 0,
"Failed to create child window\n");
6318 0, 0, 10, 10, hparent, 0, 0,
NULL);
6334 0, 0, 10, 10, hparent, 0, 0,
NULL);
6344 0, 0, 10, 10, hparent, 0, 0,
NULL);
6360 0, 0, 10, 10, hparent, 0, 0,
NULL);
6371 0, 0, 10, 10, hparent, 0, 0,
NULL);
6387 0, 0, 10, 10, hparent, 0, 0,
NULL);
6400 0, 0, 10, 10, hparent, 0, 0,
NULL);
6416 0, 0, 10, 10, hparent, 0, 0,
NULL);
6455#define ID_BUTTON 0x000e
6803 static LONG defwndproc_counter = 0;
6841 msg.descr =
"button";
6845 defwndproc_counter++;
6847 defwndproc_counter--;
6875 const struct message *setfocus;
6876 const struct message *killfocus;
6877 const struct message *setstyle;
6878 const struct message *setstate;
6879 const struct message *clearstate;
6880 const struct message *setcheck;
6881 const struct message *lbuttondown;
6882 const struct message *lbuttonup;
6883 const struct message *setfont;
6884 const struct message *settext;
6943 HFONT zfont, hfont2;
6950 0, 0, 50, 14, 0, 0, 0,
NULL);
6951 ok(
hwnd != 0,
"Failed to create button window\n");
6962 100, 100, 200, 200, 0, 0, 0,
NULL);
6963 ok(
parent != 0,
"Failed to create parent window\n");
6965 memset(&logfont, 0,
sizeof(logfont));
6971 ok(hfont2 !=
NULL,
"Failed to create Tahoma font\n");
6985 ok(
hwnd != 0,
"Failed to create button window\n");
6996 ok(dlg_code ==
button[
i].dlg_code,
"%u: wrong dlg_code %08lx\n",
i, dlg_code);
7031 ok(
state == 0,
"expected state 0, got %04lx\n",
state);
7041 ok(
state == 0x0004,
"expected state 0x0004, got %04lx\n",
state);
7055 ok(
state == 0,
"expected state 0, got %04lx\n",
state);
7086 sprintf(
desc,
"button[%i]: WM_SETTEXT on a visible button",
i);
7094 sprintf(
desc,
"button[%i]: WM_SETTEXT on an invisible button",
i);
7103 sprintf(
desc,
"button[%i]: WM_SETTEXT on an invisible button",
i);
7132 0, 0, 50, 14, 0, 0, 0,
NULL);
7133 ok(
hwnd != 0,
"Failed to create button window\n");
7145 sprintf(
desc,
"button[%i]: WM_LBUTTONDOWN on a button",
i);
7150 sprintf(
desc,
"button[%i]: WM_LBUTTONUP on a button",
i);
7157 sprintf(
desc,
"button[%i]: WM_SETFONT on a button",
i);
7186 100, 100, 200, 200, 0, 0, 0,
NULL);
7187 ok (
hwnd != 0,
"Failed to create overlapped window\n");
7222 ok(
GetObjectW(hbmp1x1,
sizeof(bm), &bm),
"Expect GetObjectW() success\n");
7223 ok(bm.
bmWidth == 1 && bm.
bmHeight == 1,
"Expect bitmap size: %d,%d, got: %d,%d\n", 1, 1,
7226 ok(
GetObjectW(hbmp2x2,
sizeof(bm), &bm),
"Expect GetObjectW() success\n");
7227 ok(bm.
bmWidth == 2 && bm.
bmHeight == 2,
"Expect bitmap size: %d,%d, got: %d,%d\n", 2, 2,
7231 ZeroMemory(&icon_info2x2,
sizeof(icon_info2x2));
7233 icon_info2x2.
hbmMask = hmask2x2;
7238 ok(
GetIconInfo(hicon2x2, &icon_info),
"Expect GetIconInfo() success\n");
7241 ok(bm.
bmWidth == 2 && bm.
bmHeight == 2,
"Expect bitmap size: %d,%d, got: %d,%d\n", 2, 2,
7247 hwnd =
CreateWindowA(
"Button",
"test", default_style |
BS_BITMAP, 0, 0, 100, 100, 0, 0, 0, 0);
7251 ok(
hbmp != 0,
"Expect hbmp not 0\n");
7254 ok(bm.
bmWidth == 1 && bm.
bmHeight == 1,
"Expect bitmap size: %d,%d, got: %d,%d\n", 1, 1,
7259 hwnd =
CreateWindowA(
"Button",
"test", default_style, 0, 0, 100, 100, 0, 0, 0, 0);
7262 ok(
ret == 0,
"Expect ret to be 0\n");
7264 ok(
hbmp ==
NULL,
"Expect hbmp to be NULL\n");
7268 hwnd =
CreateWindowA(
"Button",
"test", default_style |
BS_ICON, 0, 0, 100, 100, 0, 0, 0, 0);
7272 ok(hicon !=
NULL,
"Expect hicon not NULL\n");
7274 ok(
GetIconInfo(hicon, &icon_info),
"Expect GetIconInfo() success\n");
7277 ok(bm.
bmWidth == 2 && bm.
bmHeight == 2,
"Expect bitmap size: %d,%d, got: %d,%d\n", 2, 2,
7284 hwnd =
CreateWindowA(
"Button",
"test", default_style, 0, 0, 100, 100, 0, 0, 0, 0);
7287 ok(
ret == 0,
"Expect ret to be 0\n");
7289 ok(hicon ==
NULL,
"Expect hicon to be NULL\n");
7293 hwnd =
CreateWindowA(
"Button",
"test", default_style |
BS_BITMAP, 0, 0, 100, 100, 0, 0, 0, 0);
7294 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
7296 ok(
ret == 0,
"Expect ret to be 0\n");
7298 ok(hicon ==
NULL,
"Expect hicon to be NULL\n");
7302 hwnd =
CreateWindowA(
"Button",
"test", default_style |
BS_ICON, 0, 0, 100, 100, 0, 0, 0, 0);
7303 ok(
hwnd !=
NULL,
"Expect hwnd to be not NULL\n");
7305 ok(
ret == 0,
"Expect ret to be 0\n");
7307 ok(
hbmp ==
NULL,
"Expect hbmp to be NULL\n");
7317#define ID_RADIO1 501
7318#define ID_RADIO2 502
7319#define ID_RADIO3 503
7496 ok(
parent != 0,
"failed to create parent window\n");
7566#define test_radio(r1, s1, r2, s2, r3, s3) test_radio_dbg(r1, s1, r2, s2, r3, s3, __LINE__)
7596 ok(
parent != 0,
"failed to create parent window\n");
7606 set_radio(radio1, 1, radio2, 1, radio3, 1);
7646 ok(
ret,
"IsDialogMessage should return TRUE\n");
7653 set_radio(radio1, 0, radio2, 1, radio3, 1);
7660 ok(
ret,
"IsDialogMessage should return TRUE\n");
7681 ok(
ret,
"IsDialogMessage should return TRUE\n");
7688 ok(
hwnd == radio1,
"focus should be on radio1, not on %p\n",
hwnd);
7698 ok(
ret,
"IsDialogMessage should return TRUE\n");
7705 ok(
hwnd == radio1,
"focus should be on radio1, not on %p\n",
hwnd);
7717 ok(
ret,
"IsDialogMessage should return TRUE\n");
7724 ok(
hwnd == radio1,
"focus should be on radio1, not on %p\n",
hwnd);
7736 ok(
ret,
"IsDialogMessage should return TRUE\n");
7762 static LONG defwndproc_counter = 0;
7774 msg.descr =
"static";
7777 defwndproc_counter++;
7779 defwndproc_counter--;
7808 const struct message *setfont;
7822 0, 0, 50, 14, 0, 0, 0,
NULL);
7823 ok(
hwnd != 0,
"Failed to create static window\n");
7826 ok(dlg_code == static_ctrl[
i].dlg_code,
"%u: wrong dlg_code %08lx\n",
i, dlg_code);
7842#define ID_COMBOBOX 0x000f
7968 static LONG defwndproc_counter = 0;
7987 msg.descr =
"combo edit";
7991 defwndproc_counter++;
7993 defwndproc_counter--;
8001 static LONG defwndproc_counter = 0;
8019 msg.descr =
"combo lbox";
8023 defwndproc_counter++;
8025 defwndproc_counter--;
8032 static LONG defwndproc_counter = 0;
8051 msg.descr =
"combo";
8055 defwndproc_counter++;
8057 defwndproc_counter--;
8089 100, 100, 200, 200, 0, 0, 0,
NULL);
8090 ok(
parent != 0,
"Failed to create parent window\n");
8095 ok(combo != 0,
"Failed to create combobox window\n");
8103 ok(
ret == 0,
"expected 0, got %Id\n",
ret);
8105 ok(
ret == 1,
"expected 1, got %Id\n",
ret);
8107 ok(
ret == 2,
"expected 2, got %Id\n",
ret);
8129 ok(
parent != 0,
"Failed to create parent window\n");
8133 ok(combo != 0,
"Failed to create combobox window\n");
8138 ok(
res,
"Failed to get COMBOBOXINFO structure; LastError: %lu\n",
GetLastError());
8147 ok(
button != 0,
"Failed to create button window\n");
8189 ok(combo != 0,
"Failed to create combobox window\n");
8192 ok(
ret == 0,
"expected 0, got %Id\n",
ret);
8197 ok(
res,
"Failed to get COMBOBOXINFO structure; LastError: %lu\n",
GetLastError());
8244 msg.descr =
"wmime_keydown";
8299 printf(
"null region\n" );
8312#define check_update_rgn( hwnd, hrgn ) check_update_rgn_( __LINE__, hwnd, hrgn )
8324 ok_(__FILE__,
line)( !
hrgn,
"Update region shouldn't be empty\n" );
8330 ok_(__FILE__,
line)( 0,
"Regions are different\n" );
8333 printf(
"Update region: " );
8335 printf(
"Wanted region: " );
8494 HWND hparent, hchild;
8498 100, 100, 200, 200, 0, 0, 0,
NULL);
8499 ok (
hwnd != 0,
"Failed to create overlapped window\n");
8509 ok(
ret,
"RedrawWindow returned %d instead of TRUE\n",
ret);
8513 ok(
ret,
"RedrawWindow returned %d instead of TRUE\n",
ret);
8518 ok(
ret,
"RedrawWindow returned %d instead of TRUE\n",
ret);
8524 ok(
ret,
"RedrawWindow returned %d instead of TRUE\n",
ret);
8529 ok(
ret,
"RedrawWindow returned %d instead of TRUE\n",
ret);
8536 ok(
ret,
"RedrawWindow returned %d instead of TRUE\n",
ret);
8543 ok(
ret,
"RedrawWindow returned %d instead of TRUE\n",
ret);
8552 ok(
ret,
"RedrawWindow returned %d instead of TRUE\n",
ret);
8560 ok(
ret,
"RedrawWindow returned %d instead of TRUE\n",
ret);
8567 ok(
ret,
"RedrawWindow returned %d instead of TRUE\n",
ret);
8575 ok(
ret,
"RedrawWindow returned %d instead of TRUE\n",
ret);
8583 ok(
ret,
"RedrawWindow returned %d instead of TRUE\n",
ret);
8607 "RedrawWindow failed\n");
8612 "RedrawWindow failed\n");
8617 "RedrawWindow failed\n");
8622 "RedrawWindow failed\n");
8632 "RedrawWindow failed\n");
8635 "region should be null (%d)\n",
ret );
8642 "RedrawWindow failed\n");
8645 "region should be null (%d)\n",
ret );
8652 "RedrawWindow failed\n");
8661 "RedrawWindow failed\n");
8665 "RedrawWindow failed\n");
8814 ok(
ret,
"Invalid GetUpdateRect result %d\n",
ret );
8817 ok( !
ret,
"Invalid GetUpdateRect result %d\n",
ret );
8828 100, 100, 200, 200, 0, 0, 0,
NULL);
8829 ok (hparent != 0,
"Failed to create parent window\n");
8832 10, 10, 100, 100, hparent, 0, 0,
NULL);
8833 ok (hchild != 0,
"Failed to create child window\n");
9037 if (
winetest_debug > 1)
trace(
"testing SWP_FRAMECHANGED on parent with WS_CLIPCHILDREN\n");
9047 if (
winetest_debug > 1)
trace(
"testing SWP_FRAMECHANGED|SWP_DEFERERASE on parent with WS_CLIPCHILDREN\n");
9065 if (
winetest_debug > 1)
trace(
"testing SWP_FRAMECHANGED on parent without WS_CLIPCHILDREN\n");
9075 if (
winetest_debug > 1)
trace(
"testing SWP_FRAMECHANGED|SWP_DEFERERASE on parent without WS_CLIPCHILDREN\n");
9113 ok(!
IsWindow(hchild),
"child must be destroyed with its parent\n");
9118 100, 100, 200, 200, 0, 0, 0,
NULL);
9119 ok (hparent != 0,
"Failed to create parent window\n");
9122 10, 10, 100, 100, hparent, 0, 0,
NULL);
9123 ok (hchild != 0,
"Failed to create child window\n");
9169 ok(!
IsWindow(hchild),
"child must be destroyed with its parent\n");
9178 HBRUSH b_expectonly, b_actualonly, b_intersect;
9179 HRGN hrgn_intersect;
9180 HWND hstatic, hshow, hhide;
9204 FillRgn( hdctmp, hrgn_expect, b_expectonly );
9205 FillRgn( hdctmp, hrgn_actual, b_actualonly );
9206 FillRgn( hdctmp, hrgn_intersect, b_intersect );
9223 if (stop) toggle = hshow == hother;
9277#define subtest_swp_paint_regions(w,p,c) subtest_swp_paint_regions_(__LINE__,w,p,c)
9281 static const struct exposure_test {
9282 int ex_style,
style;
9283 BOOL shuffle_zorder;
9284 } exposure_tests[] = {
9292 HWND htoplevel =
NULL, hparent, hchild, hauxchild;
9293 const RECT rect_old = { 10, 10, 100, 100 };
9303 BOOL is_composition_possible, has_parentdc_anomaly;
9309 100, 100, 400, 400, 0, 0, 0,
NULL );
9310 ok( htoplevel != 0,
"Failed to create top-level window: %lu\n",
GetLastError() );
9319 "GetClassInfoA failed\n" );
9327 hparent =
CreateWindowExA( 0, parent_class,
"Test parent", base_style,
9328 80, 80, 200, 200, htoplevel, 0, 0,
NULL );
9329 ok( hparent != 0,
"Creating parent window (%s) returned error %lu\n",
9335 hparent, 0, 0,
NULL );
9336 ok( hchild != 0,
"Creating child window (%s) returned error %lu\n",
9340 110, 0, 0, 0, hparent, 0, 0,
NULL );
9341 ok( hauxchild != 0,
"Creating child window (%s) returned error %lu\n",
9349 const struct exposure_test *extest = &exposure_tests[
i];
9351 BOOL is_composited = is_composition_possible && has_ws_ex_composited;
9352 BOOL is_zorder_redraw = is_composited && extest->shuffle_zorder;
9355 winetest_push_context(
"%d: SetWindowPos redraw #%Id (ex_style = %#x, style = %#x, shuffle_zorder = %d)",
9356 line,
i, extest->ex_style, extest->style, extest->shuffle_zorder );
9362 for (delta = -20; delta <= 0; delta += 20)
9364 RECT rect_old_vis, rect_new, rect_new_vis;
9365 RECT rect_parent_clip, rect_child_clip;
9366 RECT rect_old_vis_child, rect_new_vis_child;
9378 rect_new = rect_old;
9381 rect_old_vis_child = rect_old;
9390 if (extest->shuffle_zorder)
9406 "GetUpdateRgn on parentshall succeed\n" );
9408 "GetUpdateRgn on child shall succeed\n" );
9412 IntersectRect( &rect_old_vis, &rect_old, &rect_parent_clip );
9414 IntersectRect( &rect_new_vis, &rect_new, &rect_parent_clip );
9417 if (!
EqualRect( &rect_old, &rect_new ) || is_zorder_redraw)
9426 rgn_ok =
EqualRgn( hrgn_expect, hrgn_actual );
9427 if (!rgn_ok &&
broken( has_parentdc_anomaly && is_composited ))
9431 trace(
"Forcing non-composited update region (broken)\n" );
9437 ok( !!rgn_ok,
"Parent update region shall match expected region\n" );
9442 trace(
"Expected parent update region: " );
9444 trace(
"Actual parent update region: " );
9461 rect_new_vis_child = rect_new;
9468 RECT rect_outer_clip;
9471 IntersectRect( &rect_child_clip, &rect_child_clip, &rect_outer_clip );
9473 IntersectRect( &rect_old_vis_child, &rect_old_vis_child, &rect_child_clip );
9474 SetRectRgn( hrgn_old_vis_child, rect_old_vis_child.
left, rect_old_vis_child.
top, rect_old_vis_child.
right, rect_old_vis_child.
bottom );
9475 IntersectRect( &rect_new_vis_child, &rect_new_vis_child, &rect_child_clip );
9476 SetRectRgn( hrgn_new_vis_child, rect_new_vis_child.
left, rect_new_vis_child.
top, rect_new_vis_child.
right, rect_new_vis_child.
bottom );
9478 if (!
EqualRect( &rect_old, &rect_new ) || is_zorder_redraw)
9487 rgn_ok =
EqualRgn( hrgn_expect_child, hrgn_actual_child );
9488 if (!rgn_ok &&
broken( has_parentdc_anomaly && is_composited ))
9492 trace(
"Forcing non-composited update region (broken)\n" );
9498 ok( !!rgn_ok,
"Child update region shall match expected region\n" );
9503 trace(
"Expected child update region: " );
9505 trace(
"Actual child update region: " );
9555 const RECT rect_1 = { 10, 10, 100, 100 };
9556 const RECT rect_2 = { 20, 20, 120, 120 };
9557 RECT rect_expect_child, rect_expect;
9558 RECT rect_actual_child, rect_actual;
9559 HWND hparent, hchild;
9563 80, 80, 200, 200,
NULL, 0, 0,
NULL );
9564 ok( hparent != 0,
"Creating parent window returned error %lu\n",
GetLastError() );
9567 0, 0, 100, 100, hparent, 0, 0,
NULL );
9568 ok( hchild != 0,
"Creating child window returned error %lu\n",
GetLastError() );
9583 "GetUpdateRgn on parent shall succeed\n" );
9585 "GetUpdateRgn on child shall succeed\n" );
9591 rect_expect = rect_1;
9592 ok(
EqualRect( &rect_actual, &rect_expect ),
"parent update region: got %s, expected %s\n",
9599 ok(
GetClientRect( hchild, &rect_expect_child ),
"GetClientRect failed\n" );
9600 ok(
EqualRect( &rect_actual_child, &rect_expect_child ),
"child update region: got %s, expected %s\n",
9620 "GetUpdateRgn on parent shall succeed\n" );
9622 "GetUpdateRgn on child shall succeed\n" );
9628 rect_expect = rect_2;
9629 ok(
EqualRect( &rect_actual, &rect_expect ),
"parent update region: got %s, expected %s\n",
9636 ok(
GetClientRect( hchild, &rect_expect_child ),
"GetClientRect failed\n" );
9637 ok(
EqualRect( &rect_actual_child, &rect_expect_child ),
"child update region: got %s, expected %s\n",
9650 const RECT rect_1 = { 10, 10, 100, 100 };
9651 RECT rect_expect_child, rect_expect;
9652 RECT rect_actual_child, rect_actual;
9653 HWND hparent, hchild;
9657 80, 80, 200, 200,
NULL, 0, 0,
NULL );
9658 ok( hparent != 0,
"Creating parent window returned error %lu\n",
GetLastError() );
9661 10, 10, 0, 0, hparent, 0, 0,
NULL );
9662 ok( hchild != 0,
"Creating child window returned error %lu\n",
GetLastError() );
9677 "GetUpdateRgn on parent shall succeed\n" );
9679 "GetUpdateRgn on child shall succeed\n" );
9685 rect_expect = rect_1;
9686 ok(
EqualRect( &rect_actual, &rect_expect ),
"parent update region: got %s, expected %s\n",
9693 ok(
GetClientRect( hchild, &rect_expect_child ),
"GetClientRect failed\n" );
9694 ok(
EqualRect( &rect_actual_child, &rect_expect_child ),
"child update region: got %s, expected %s\n",
9705 static const struct movesize_test {
9707 } movesize_tests[] = {
9720 const int x0 = 100,
y0 = 100, w0 = 150, h0 = 150;
9724 .
style = class_style,
9729 .lpszClassName =
"TestHVRedrawClass"
9734 hwnd =
CreateWindowExA( 0, cls.
lpszClassName,
"Test window",
style,
x0,
y0, w0, h0, hparent, 0, 0,
NULL );
9735 ok(
hwnd !=
NULL,
"Failed to create the window\n");
9742 const struct movesize_test *
test = &movesize_tests[
i];
9745 RECT rect_old_vis, rect_new_vis;
9768 rgn_ok =
EqualRgn( hrgn_expect, hrgn_actual );
9772 ok( !!rgn_ok,
"Update region shall match expected region\n" );
9777 trace(
"Expected update region: " );
9779 trace(
"Actual update region: " );
9818 100, 100, 400, 400, 0, 0, 0,
NULL );
9819 ok( htoplevel != 0,
"Failed to create top-level window: %lu\n",
GetLastError() );
9838 HDESK prev_thr_desktop, prev_inp_desktop, post_inp_desktop, temp_desktop;
9839 char temp_desktop_name[1024], curr_desktop_name[1024];
9855 "WineTest-%08lX-%08lX-%08lX%08lX-%s",
9859 "sprintf returned %d (out of memory, or name too long?)\n",
result );
9865 ok_(
file,
line)( temp_desktop !=
NULL,
"CreateDesktopA(%s, ..) error %lu\n",
9872 trace_(
file,
line)(
"sanity check: no concurrent WineTest desktop\n" );
9879 curr_desktop_name,
sizeof(curr_desktop_name), &
length );
9883 "unexpected input desktop name %s (concurrent WineTest run?)\n",
9906 trace_(
file,
line)(
"sanity check: input desktop has not been changed\n" );
9916 curr_desktop_name,
sizeof(curr_desktop_name), &
length );
9917 ok_(
file,
line)(
result,
"GetUserObjectInformationA(post_inp_desktop=%p) error %lu [rl = %lu]\n",
9920 "different desktop name: %s != %s (no switch or concurrent WineTest run?)\n",
9932 "SetThreadDesktop(prev_thr_desktop=%p) error %lu\n",
9948 "CloseDesktop(temp_desktop=%p) error %lu\n",
9954#define run_in_temp_desktop(f) run_in_temp_desktop_(__FILE__, __LINE__, #f, f)
9991 100, 100, 200, 200, 0, 0, 0,
NULL);
10015 ok (hchild != 0,
"Failed to create child window\n");
10038 ok (child_event.
hwnd != 0,
"Failed to create child window\n");
10047 if (
ret != 1)
break;
10051 ok( !
ret,
"WaitForSingleObject failed %lx\n",
ret );
10056"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">"
10057"<assemblyIdentity version=\"1.2.3.4\" name=\"testdep1\" type=\"win32\" processorArchitecture=\"" ARCH "\"/>"
10058" <file name=\"testdep.dll\" />"
10062"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">"
10063"<assemblyIdentity version=\"1.2.3.4\" name=\"Wine.Test\" type=\"win32\" />"
10065" <dependentAssembly>"
10066" <assemblyIdentity type=\"win32\" name=\"testdep1\" version=\"1.2.3.4\" processorArchitecture=\"" ARCH "\" />"
10067" </dependentAssembly>"
10092 actctx.cbSize =
sizeof(ACTCTXW);
10101 ok(
actctx.wProcessorArchitecture == 0,
"wProcessorArchitecture=%d\n",
actctx.wProcessorArchitecture);
10103 ok(
actctx.lpAssemblyDirectory ==
NULL,
"lpAssemblyDirectory=%p\n",
actctx.lpAssemblyDirectory);
10105 ok(
actctx.lpApplicationName ==
NULL,
"lpApplicationName=%p\n",
actctx.lpApplicationName);
10119 int len, expected_len;
10126 win_skip(
"skipping interthread message test under win9x\n");
10145 expected_len =
lstrlenA(
"window caption text");
10149 ok(
len == expected_len,
"CallWindowProcA(WM_GETTEXT) error %ld, len %d, expected len %d\n",
GetLastError(),
len, expected_len);
10150 ok(!
lstrcmpA(
buf,
"window caption text"),
"window text mismatch\n");
10154 msg.wParam =
sizeof(
buf);
10160 "DispatchMessageA(WM_GETTEXT) succeeded on another thread window: ret %d, error %ld\n",
len,
GetLastError());
10170 "DispatchMessageA(WM_TIMER) failed on another thread window: ret %d, error %ld\n",
len,
GetLastError());
10181 100, 100, 200, 200, 0, 0, 0,
NULL);
10192 if (
ret != 1)
break;
10195 ok( !
ret,
"MsgWaitForMultipleObjects failed %x\n",
ret );
10199 ok( !
ret,
"WaitForSingleObject failed %x\n",
ret );
10203 ok( !
ret,
"WaitForSingleObject failed %x\n",
ret );
10221 handle = (
void*)0xdeadbeef;
10244 ok(
ret,
"thread window returned %d\n",
ret);
10248 ok(
ret,
"thread window returned %d\n",
ret);
10595 log_msg.
descr =
"accel";
10613 100, 100, 200, 200, 0, 0, 0,
NULL);
10626 ok(!(
state & 0x8000),
"wrong Shift state %04x\n",
state);
10639 skip(
"skipping ascii VK events on non-us keyboard\n");
10650 skip(
"queuing key events not supported\n" );
10839 skip(
"Shift+MouseButton event didn't get to the window\n" );
10852 static LONG defwndproc_counter = 0;
10853 static LONG beginpaint_counter = 0;
10890 ok(capture ==
hwnd,
"capture should NOT be released at this point (capture %p)\n", capture);
10916 ACTIVATION_CONTEXT_BASIC_INFORMATION basicinfo;
10920 handle = (
void*)0xdeadbeef;
10925 memset(&basicinfo, 0xff,
sizeof(basicinfo));
10926 ret =
QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX,
handle, 0, ActivationContextBasicInformation,
10927 &basicinfo,
sizeof(basicinfo),
NULL);
10929 ok(basicinfo.hActCtx ==
NULL,
"got %p\n", basicinfo.hActCtx);
10930 ok(basicinfo.dwFlags == 0,
"got %lx\n", basicinfo.dwFlags);
10953 msg.descr =
"MsgCheckProc";
10966 trace(
"Reserved=%ld,%ld MaxSize=%ld,%ld MaxPos=%ld,%ld MinTrack=%ld,%ld MaxTrack=%ld,%ld\n",
10973 ok(minmax->
ptMaxSize.
x == rc.
right,
"default width of maximized child %ld != %ld\n",
10975 ok(minmax->
ptMaxSize.
y == rc.
bottom,
"default height of maximized child %ld != %ld\n",
10982 beginpaint_counter++;
10984 beginpaint_counter--;
10995 defwndproc_counter++;
10998 defwndproc_counter--;
11015 static LONG defwndproc_counter = 0;
11035 msg.descr =
"popup";
11044 defwndproc_counter++;
11046 defwndproc_counter--;
11053 static LONG defwndproc_counter = 0;
11054 static LONG beginpaint_counter = 0;
11085 msg.descr =
"parent";
11092 beginpaint_counter++;
11094 beginpaint_counter--;
11099 defwndproc_counter++;
11101 defwndproc_counter--;
11123 static LONG defwndproc_counter = 0;
11134 ok(
ret == 0,
"DM_GETDEFID should return 0 after EndDialog, got %Ix\n",
ret );
11145 msg.descr =
"dialog";
11148 defwndproc_counter++;
11150 defwndproc_counter--;
11157 static LONG defwndproc_counter = 0;
11188 msg.descr =
"show";
11191 defwndproc_counter++;
11193 defwndproc_counter--;
11218 else ok(
broken(1),
"infinite loop\n");
11229 static LONG defwndproc_counter = 0;
11232 DWORD queue_status;
11245 msg.descr =
"HotkeyMsgCheckProcA";
11249 defwndproc_counter++;
11251 defwndproc_counter--;
11256 ok((queue_status & (
QS_HOTKEY << 16)) ==
QS_HOTKEY << 16,
"expected QS_HOTKEY << 16 set, got %lx\n", queue_status);
11264 ok((queue_status & (
QS_HOTKEY << 16)) == 0,
"expected QS_HOTKEY << 16 cleared, got %lx\n", queue_status);
11390 msg.message = nCode;
11422 msg.message = nCode;
11452 msg.wParam = object_id;
11453 msg.lParam = child_id;
11482 ok(ifaceA->
dbcc_size == expect_size,
"Expected %lu, got %lu.\n", expect_size, ifaceA->
dbcc_size);
11499static const WCHAR dummy_window_text[] = {
'd',
'u',
'm',
'm',
'y',
' ',
't',
'e',
'x',
't',0};
11518 static const WCHAR wszMsgConversionClass[] =
11519 {
'M',
's',
'g',
'C',
'o',
'n',
'v',
'e',
'r',
's',
'i',
'o',
'n',
'C',
'l',
'a',
's',
's',0};
11543 100, 100, 200, 200, 0, 0, 0,
NULL);
11544 ok(
hwnd !=
NULL,
"Window creation failed\n");
11550 ok(lRes == 0,
"String should have been converted\n");
11552 ok(lRes == 1,
"String shouldn't have been converted\n");
11558 ok(lRes == 1,
"String shouldn't have been converted\n");
11560 ok(lRes == 1,
"String shouldn't have been converted\n");
11565 ok(lRes == 0,
"String should have been converted\n");
11567 ok(lRes == 1,
"String shouldn't have been converted\n");
11574 "PostMessage on sync only message returned %Id, last error %ld\n", lRes,
GetLastError());
11578 "PostMessage on sync only message returned %Id, last error %ld\n", lRes,
GetLastError());
11582 "PosThreadtMessage on sync only message returned %Id, last error %ld\n", lRes,
GetLastError());
11586 "PosThreadtMessage on sync only message returned %Id, last error %ld\n", lRes,
GetLastError());
11590 "SendNotifyMessage on sync only message returned %Id, last error %ld\n", lRes,
GetLastError());
11594 "SendNotifyMessage on sync only message returned %Id, last error %ld\n", lRes,
GetLastError());
11598 "SendMessageCallback on sync only message returned %Id, last error %ld\n", lRes,
GetLastError());
11602 "SendMessageCallback on sync only message returned %Id, last error %ld\n", lRes,
GetLastError());
11621 100, 100, 200, 200, 0, 0, 0,
NULL);
11627 "got bad length %Id\n", lRes );
11634 "got bad length %Id\n", lRes );
11642 "got bad length %Id\n", lRes );
11649 "got bad length %Id\n", lRes );
11666#define TIMER_ID 0x19
11667#define TIMER_COUNT 500
11668#define TIMER_DURATION_EXPECTED 10000
11669#define TIMER_DURATION_ALT 15600
11670#define TIMER_DURATION_TOLERANCE 1000
11681 return (la > lb) - (la < lb);
11692 ok(
ret,
"QueryPerformanceCounter failed\n");
11711 ok(
ret,
"QueryPerformanceFrequency failed\n");
11736 ok(
r,
"KillTimer failed in thread\n");
11738 ok(
r,
"SetTimer failed in thread\n");
11741 ok(
r,
"SetEvent failed in thread\n");
11757 ok(
info.id,
"SetTimer failed\n");
11777 ok(
id != 0,
"did not get id from SetTimer.\n");
11778 ok(
id==
TIMER_ID,
"SetTimer timer ID different\n");
11783 "did not get expected median timeout (%d != ~%d).\n",
11787 if (pSetSystemTimer)
11791 ok(
id != 0,
"did not get id from SetSystemTimer.\n");
11792 ok(
id==
TIMER_ID,
"SetTimer timer ID different\n");
11802 "did not get expected median timeout (%d != ~%d).\n",
11804 ok(pKillSystemTimer(
info.hWnd,
id),
"KillSystemTimer failed\n");
11820 ok(
id != 0,
"did not get id from SetTimer.\n");
11822 ok(id2 ==
id,
"did not get same id from SetTimer when replacing (%Ii expected %Ii).\n", id2,
id);
11825 ok(
count == 0,
"did not get zero count as expected (%i).\n",
count);
11828 ok(
count == 1,
"did not get one count as expected (%i).\n",
count);
11832 ok(
count == 1,
"killing replaced timer did not work (%i).\n",
count);
11840 ok(
id != 0,
"did not get id from SetTimer.\n");
11845 "did not get expected median timeout (%d != ~%d).\n",
11850 if (pSetCoalescableTimer)
11854 ok(
id != 0,
"SetCoalescableTimer failed with %lu.\n",
GetLastError());
11858 ok(
count > 1,
"expected count > 1, got %d.\n",
count);
11862 win_skip(
"SetCoalescableTimer not available.\n");
11869 if (!
ids[
i])
break;
11884 ok(
id != 0,
"did not get id from SetTimer.\n");
11893 ok(
count == 1,
"did not get one count as expected (%i).\n",
count);
12007 msg.wParam = object_id;
12009 msg.descr =
"WEH_2";
12028 msg.message = nCode;
12032 msg.descr =
"CBT_2";
12050 msg.descr =
"CBT_2";
12067 msg.message = nCode;
12071 msg.descr =
"CBT_2";
12084 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP, 0,0,0,0,0,0,0,
NULL);
12116 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP, 0,0,0,0,0,0,0,
NULL);
12147 hwnd =
CreateWindowExA(0,
"static",
NULL,
WS_POPUP, 0,0,0,0,0,0,0,
NULL);
12194 skip(
"cannot set global hook\n" );
12224 ok(!
IsWindow(hwnd2),
"window should be destroyed on thread exit\n");
12227 if (!pSetWinEventHook || !pNotifyWinEvent || !pUnhookWinEvent)
12253 hhook = pSetWinEventHook(
12255 EVENT_OBJECT_LOCATIONCHANGE,
12288 ok(!
IsWindow(hwnd2),
"window should be destroyed on thread exit\n");
12292 hhook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0,
12332 ok(!
IsWindow(hwnd2),
"window should be destroyed on thread exit\n");
12340 win_skip(
"Skipping WH_MOUSE_LL test on this platform\n");
12341 goto skip_mouse_ll_hook_test;
12370 ok(!
IsWindow(hwnd2),
"window should be destroyed on thread exit\n");
12372skip_mouse_ll_hook_test:
12379 static const char *dll_name =
"testdll.dll";