News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Is there a WM_ message which...

Started by Mark Jones, February 08, 2005, 12:08:36 AM

Previous topic - Next topic

Mark Jones

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. :)
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Biterider

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

sluggy

What you need is WM_CREATE. As mentioned by MSDN here, 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.

Relvinian

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

Mark Jones

"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08