My application creates a window in the main thread, but I want the message loop in a separate thread. Is there any way to catch the messages from that window while an another thread? I tried giving GetMessage that window's handle, it didn't work. I could just create the window in the separate thread as well, but that would mean dealing with the single void pointer i'm allowed to pass through CreateThread which I would prefer to avoid.

I didn't fix this specific problem, but due to another fix I only needed to pass one parameter through CreateThread. This made it easy enough to just have the window creation and message loop in one thread.