user32: Make message test pass cleanly under XP SP2
Dmitry Timoshkov
dmitry at codeweavers.com
Tue Sep 25 06:59:06 CDT 2007
"Alexandre Julliard" <julliard at winehq.org> wrote:
> Dmitry Timoshkov <dmitry at 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.
More information about the wine-devel
mailing list