Dmitry Timoshkov dmitry@codeweavers.com writes:
/* posted message */ PostMessageA( hwnd, WM_CHAR, dbch[0], 0 );
msg.message = 0xdeadbeef; ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); PostMessageA( hwnd, WM_CHAR, dbch[1], 0 ); ok( PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "no message\n" ); ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); ok( msg.wParam == wch, "bad wparam %lx/%x\n", msg.wParam, wch );
msg.message = 0xdeadbeef; ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message );
/* posted thread message */ PostThreadMessageA( GetCurrentThreadId(), WM_CHAR, dbch[0], 0 );
msg.message = 0xdeadbeef; ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); PostMessageA( hwnd, WM_CHAR, dbch[1], 0 ); ok( PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "no message\n" ); ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); ok( msg.wParam == wch, "bad wparam %lx/%x\n", msg.wParam, wch );
msg.message = 0xdeadbeef; ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message );
I'm not sure I see the point of that change, since the message is not tested when PeekMessage fails.