[Resend 2] user32: Post the WM_KEY{DOWN|UP} messagewhenWM_IME_KEY{DOWN|UP} message is generated by IME.
Dmitry Timoshkov
dmitry at codeweavers.com
Wed Apr 30 05:56:33 CDT 2008
"ByeongSik Jeon" <bsjeon at hanmail.net> wrote:
> + while (TRUE)
> + {
> + if ( PeekMessage(&msg, 0, 0, 0, PM_REMOVE) )
> + {
> + struct message posted_msg;
> +
> + msg_count++;
> +
> + trace("posted message[%d]: %p, %04x, %08lx, %08lx\n",
> + msg_count, msg.hwnd, msg.message, msg.wParam, msg.lParam);
> +
> + posted_msg.message = msg.message;
> + posted_msg.flags = posted|wparam|lparam;
> + posted_msg.wParam = msg.wParam;
> + posted_msg.lParam = msg.lParam;
> + add_message(&posted_msg);
> +
> + TranslateMessage(&msg);
> + DispatchMessage(&msg);
> +
> + if ( msg.message == WM_CHAR && msg.wParam == VK_RETURN )
> + break;
> + }
> + }
You need to fetch all available messages, not just the selected ones. In order
to do that replace 'while (TRUE)' loop by the 'while (PeekMeessage())' one,
and as I pointed out earlier add_message() should be done only inside of
the message proc. So the whole code above should be simplified to just
while (PeekMeessage(&msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
--
Dmitry.
More information about the wine-devel
mailing list