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.
"Alexandre Julliard" julliard@winehq.org wrote:
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.
I added that changes because Microsoft compiler from latest Vista SDK complains that variables might be used without being initialized.
"Dmitry Timoshkov" dmitry@codeweavers.com writes:
I added that changes because Microsoft compiler from latest Vista SDK complains that variables might be used without being initialized.
It sounds like that compiler is on crack. I don't think we want to sprinkle assignments all over the place just to work around that.