about threads in GUI
-
hi, can multiple threads access and send messages to the same dialog resources ( text boxes, lists,..)at the same time ? i.e one increments a progress bar, the other responds to menu commands etc. thx
-
hi, can multiple threads access and send messages to the same dialog resources ( text boxes, lists,..)at the same time ? i.e one increments a progress bar, the other responds to menu commands etc. thx
saadani wrote:
can multiple threads access and send messages to the same dialog resources ( text boxes, lists,..)at the same time ?
Sort of. It's better to post those messages to the control's parent instead.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
-
hi, can multiple threads access and send messages to the same dialog resources ( text boxes, lists,..)at the same time ? i.e one increments a progress bar, the other responds to menu commands etc. thx
Not exactly. The thread that creates a window is the only thread that can pump messages for that window. So multiple threads can all send/post messages to a window, but only one thread can process them. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ