Boost logo

Boost Users :

From: Jonathan Brownell (alphaomega_at_[hidden])
Date: 2002-02-24 16:51:39


Steve,

You brought up an interesting problem. Here are my thoughts on a
possible solution:

Rather than calling SetDlgItemText() and immediately starting a
WaitForSingleObject(), instead you could create a user-defined message
called, say, WM_USER_WAITFORTHREAD. Then, post a WM_USER_WAITFORTHREAD
message to your HWND right after the SetDlgItemText(). Since the
item-text change message was sent first, it should be executed before
the thread-waiting message is processed. If you use MFC, you can either
manually add a handler for WM_USER_WAITFORTHREAD into its
message-mapping section or just override CWnd::PreTranslateMessage().

I apologize for the off-topic-ness of all this. Sorry :)

-Jonathan


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net