Can you create a child window from a secondary child thread or it must be created from GUI thread? Assuming the life time of child thread is until the end of program.
+3
A:
Unlike other operating systems, each thread in windows can host its own message pump, and thus windows.
Care must be taken as child windows need to communicate synchronously with their parent - so you must take care to ensure that neither thread holds a critical section or synchronous object while calling an window API that could result in a SendMessage being sent - this WILL deadlock the threads.
Chris Becke
2010-09-04 13:49:09