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?