Hi!

I'm trying to write a WinAPI example to have multi-threaded GUI. I wanna have a Window class, which creates a window and listens to its messages in a separate thread when constructed.  This will allow me to write a main function like this:

void main()
{
    Window w = new Window;
    w.move(100, 200);
    w.resize(800, 600);
    w.show();
}

The methods called for the window will send asynchronous messages, which will cause the window to change its position, size and visibility on-the-fly. This is convenient, because no message loop needs to be launched separately and every window will rocess its messages in a separate thread.

Can anyone please tell me how to achieve this?

--
Bye,
Gor Gyolchanyan.