|
-
May 6th, 1999, 03:56 AM
#1
User interface threads & messages getting lost
Hi all,
I have a (modeless) dialog running in a userinterface thread. I am sending messages to the dialog using PostThreadMessage. If I leave the dlg alone this works fine, all messages get through and are processed. However if I try to move the dlg while the messages are comming through (by clicking on title bar and dragging) a large number of messages are lost.
I have tried adding my own PostThreadMessage function as follows:
BOOL CGraphThread::MyPostThreadMessage(UINT uMessage, WPARAM wParam, LPARAM lParam)
{
while ( !CWinThread::PostThreadMessage(uMessage, wParam, lParam) )
Sleep(0);
return true;
}
But even this doesnt work. Its a bit of an improvement - if I click on the titlebar and hold it down, the message are not processed, but when I release the mouse button, they are processed then, but if I drag the titlebar, then the messages posted during the drag are NOT processed.
I would like not to have to resort to having to waiting on an event until the message has been processed as the system I am writing is a real(ish)-time system, and I cant hold up my process while waiting for the dlg to process the messages.
Regards,
Brian
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|