|
-
October 15th, 2005, 12:10 PM
#3
Re: Waiting in GUI till thread ends
 Originally Posted by gstercken
Not sure what you really want. Without a worker thread, your GUI would wait for the operation to complete (and hence freeze). You normally introduce a worker thread so that your GUI does not have to wait. Now you say you want to wait - so why the thread? What do you mean by "waiting" without freezing? What exactly is the behaviour you are expecting?
Thank you for your answer:
This is what I'm trying to do in the button handler:
void CThreadDlg::OnButton1()
{
// TODO: Add your control notification handler code here
CreateThread (0,1024*10,Acquire,this,0,&AcquireId);
while (!ThreadEnd)
Sleep(10);
}
The while (with sleep) causes the GUI to freeze. The window can not be moved.
What should I do ?
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
|