|
-
October 15th, 2005, 03:21 PM
#12
Re: Waiting in GUI till thread ends
Give your dialog's hwnd to the thread. When the worker thread ends, have it post a message to your dialog to tell it that it's done.
Make your own message, e.g.
#define WM_MYTHREADENDED WM_USER
Then at the end of your worker thread
::PostMessage(hwndDialog, WM_MYTHREADENDED, 0, 0);
And then make a method in your dialog class called OnThreadEnded().
Then in your dialog's message map:
ON_MESSAGE(WM_MYTHREADENDED, OnThreadEnded)
And your method will get called when the thread is done. Does that help?
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
|