-
July 30th, 2012, 03:34 PM
#1
Is it possible to use BackgroundWorker Thread for Win32 projects????
First I'll explain what exactly I want to do here. I have a dialog box in which I am showing a frame. Using menu from this dialog, I open another Dialog box which shows me macrogrid block information from the first dialog. So to show 2nd dialog box I am using function : DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG1), NULL, DialogProc);
But this transfers the execution of the program to the new dialog box and I can't process further messages in the 1st dialog unless I close the new dialog box.
Can someone please tell me a way to solve this problem??? Is it the same thing as modal vs modeless dialog-boxes??
Someone suggested me to use BackgroundWorker thread for this purpose. But when I tried to research about it, I read at many places that it doesn't work with win32 programming. Instead in some forums I read about using PostMessage function for the same purpose. Can someone help me deciding what would be the best approach to handle this problem? I would really be grateful if someone could explain it in detail.
Thanks a lot.
-
July 30th, 2012, 06:41 PM
#2
Re: Is it possible to use BackgroundWorker Thread for Win32 projects????
Generally you'll want to keep all the UI components running in a main thread. To solve your problem, can you make the second dialog modeless rather than modal then send a message to the main dialog?
Tags for this Thread
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
|