Hi, is there a WM_? message which triggers only once, AFTER the window is drawn?
There is WM_ENTERIDLE, but this sounds like it would be called continuously. Is conditionals the only answer?
TIA. :)
Hi Mark,
I way to do what you want is to intercept (subclassing) the WM_PAINT. Once you have done it, execute the default drawing code (DefWndProc) and then your own code, returning the the value given by the default code.
Regards,
Biterider
What you need is WM_CREATE. As mentioned by MSDN here (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowmessages/wm_create.asp), this message is sent *after* the window is created, but *before* it is visible. This is when you normally create child windows. If you want control before the window is created, look for the WM_NCCREATE message.
Quote from: Mark Jones on February 08, 2005, 12:08:36 AM
Hi, is there a WM_? message which triggers only once, AFTER the window is drawn?
There is WM_ENTERIDLE, but this sounds like it would be called continuously. Is conditionals the only answer?
TIA. :)
There is no specific message which is sent only ONCE after a window has been painted. There are other messages you can use (WM_SHOWWINDOW, WM_ACTIVATE, etc) to process during limited conditions of the window. If you only want to process a message ONCE AFTER the window is VISIBLE, then the best method is to POST yourself a message to your windows/ctrl in the WM_CREATE handler.
Relvinian
Cool, thanks. :U