Re: PostThreadMessage and Lost Messages
"RobKinney1" <mydigitalportal.net@gmail.com.NOSPAMPLEASE> wrote in message
news:76A6EF97-EE6A-47DC-B370-5EAB654407DE@microsoft.com...
Thank you for posting Michael. This is starting to make sense. So on
that
tip they give about using PostMessage instead and post to a window, are
they
inferring you post to CMainFrame? Or do I have to make some kind of
hidden
window to post to that handles these messages?
If so, and I have to post to a different window, how does that message
intercepting window going to post back to the GUI CWinApp class and have
it
invoke/call a function?
Maybe I am missing something real simple to this concept....
Thanks,
Rob
You can PostMessage to any window created in the main thread. CMainFrame is
a good choice but any window will work.
The message handler in the window can simply use AfxGetApp() to get a
pointer to the CWinApp. That pointer can be used to call an app function.
--
Scott McPhillips [VC++ MVP]