Sebastian Lackner <sebastian(a)fds-team.de> writes:
@@ -11188,6 +11188,35 @@ static void test_quit_message(void) ok_sequence(WmStopQuitSeq, "WmStopQuitSeq", FALSE); }
+static void test_notify_message(void) +{ + HWND hwnd; + BOOL ret; + + hwnd = CreateWindowExA(0, "TestWindowClass", NULL, WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0, NULL, NULL, 0); + ok(hwnd != 0, "Failed to create window\n"); + + ret = SendNotifyMessageA(hwnd, WM_NOTIFY, 0x1234, 0xdeadbeef); + ok(ret == TRUE, "SendNotifyMessageA failed with error %u\n", GetLastError()); + ret = SendNotifyMessageW(hwnd, WM_NOTIFY, 0x1234, 0xdeadbeef); + ok(ret == TRUE, "SendNotifyMessageW failed with error %u\n", GetLastError()); + ret = SendMessageCallbackA(hwnd, WM_NOTIFY, 0x1234, 0xdeadbeef, NULL, 0); + ok(ret == TRUE, "SendMessageCallbackA failed with error %u\n", GetLastError()); + ret = SendMessageCallbackW(hwnd, WM_NOTIFY, 0x1234, 0xdeadbeef, NULL, 0); + ok(ret == TRUE, "SendMessageCallbackW failed with error %u\n", GetLastError()); + ret = PostMessageA(hwnd, WM_NOTIFY, 0x1234, 0xdeadbeef); + ok(ret == TRUE, "PostMessageA failed with error %u\n", GetLastError()); + ret = PostMessageW(hwnd, WM_NOTIFY, 0x1234, 0xdeadbeef); + ok(ret == TRUE, "PostMessageW failed with error %u\n", GetLastError()); + ret = PostThreadMessageA(GetCurrentThreadId(), WM_NOTIFY, 0x1234, 0xdeadbeef); + ok(ret == TRUE, "PostThreadMessageA failed with error %u\n", GetLastError()); + ret = PostThreadMessageW(GetCurrentThreadId(), WM_NOTIFY, 0x1234, 0xdeadbeef); + ok(ret == TRUE, "PostThreadMessageW failed with error %u\n", GetLastError());
It would be interesting to test the received message contents too, also for the case of valid data. -- Alexandre Julliard julliard(a)winehq.org