Lindley
January 16th, 2008, 08:56 AM
I'm trying to tack on the ability to show a window to an existing non-windowed program. That means I don't have my main thread running an event loop.
I had thought to just spawn a thread which would create a window, then run an event loop. I figured I could update the contents of the window from another thread using a mutex, and just let that one thread handle all window stuff.
However, this doesn't appear to work----the window behaves as if its events aren't being processed. The documentation I found for the GetQueueStatus etc functions indicates they're per-thread, but I'm not sure what it means for a window to *belong* to a thread. I thought that just meant the window was created in that thread...but perhaps not, since it isn't working.
What's the deal here?
I had thought to just spawn a thread which would create a window, then run an event loop. I figured I could update the contents of the window from another thread using a mutex, and just let that one thread handle all window stuff.
However, this doesn't appear to work----the window behaves as if its events aren't being processed. The documentation I found for the GetQueueStatus etc functions indicates they're per-thread, but I'm not sure what it means for a window to *belong* to a thread. I thought that just meant the window was created in that thread...but perhaps not, since it isn't working.
What's the deal here?