Hi ,
Nice to see you again, Joseph. Instead of telling what I am doing,
I'll tell you what I am trying to do and the you can help me toward
reach a good solution. Problem is simple. A dialog based application
runs. It creates a worker thread. Everything is good. Worker thread
runs great. Now comes the confusion. Thread code needs to pause
because of some logic desicion making that happened. When thread is
paused, I want to display a message to user in a dialog window and I
want the user to acknowledge that he/she saw the message and clicked
some button to confirm. Once button is clicked, that newly popped
window should disappear and worker thread should resume. That is,
worker thread becomes unpaused. This is it.
From what I learned from you, you said threads are free to do anything
as long as they adhere to certain guidelines such as not touch GUI
objects. I imagined it was acceptable for secondary thread to create
a dialog based window.
What is best way to solving this? Thanks.
main thread display the dialog. The worker thread suspends in
WaitForSingleObject until the main thread does a SetEvent. Just fix
should be fine.