[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [Resend 2] user32: Post the WM_KEY{DOWN|UP}
From: "Dmitry Timoshkov" <dmitry () codeweavers ! com>
Date: 2008-04-30 10:56:33
Message-ID: 004401c8aab0$dc43dc60$a600fea9 () DMITRY
[Download RAW message or body]
"ByeongSik Jeon" <bsjeon@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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic