At first I thought that you SHOULD ONLY do painting stuff, if
windows where sending a WM_PAINT message, and under
WM_CLOSE, you would close your window.
But then I where fooling around with those messages, like:

.elseif uMsg == WM_CLOSE
invoke CreateWindowEx,NULL,addr ButtonClass,addr ButtonText_1,\
WS_CHILD or WS_VISIBLE or BS_DEFPUSHBUTTON,\
300,42,90,18,hWnd,ButtonID_1,hInstance,NULL
mov hwndButton_1,eax

or

.elseif uMsg == WM_PAINT
invoke SendMessage,hWnd,WM_COMMAND,IDM_EXIT,0

It seems that you can sort of mix around with CreateWindow, and
SendMessage and maybe lots of other API's.


So for my maybe lame question:

Do we have to follow strict rules and regulations,
or can we do what we want, as we like ....

:confused:
Posted on 2003-10-13 13:59:42 by The SharK
As always when communicating, sticking to a protocal will increase the likelihood of getting what you're after (ie follow the rules laid out by MS). That said, it is okay to send message into the queue for your window when ever you want.
Posted on 2003-10-13 14:14:17 by bitRAKE
Must mention that apps which rely heavily on sending WM's internally will suffer under load from "Message Queue Stress" - they'll choke up, and the gui will become unresponsive - one solution is to use data variables as flags.
If your win32 app suffers "gui lockup" under load, examine the possibilities for reducing internal WM generation.
Posted on 2003-10-13 20:51:25 by Homer