October 28, 2025, 02:36:43 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


When to return TRUE from a handler

Started by Bruce Peaslee, December 31, 2008, 09:35:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bruce Peaslee

"A message handler must return an integer indicating whether or not any other handlers should be called.  0 means it is ok to call the default handler for the message, 1 indicates no other action should be performed.  Just return 0 for now as I will document the reasons for this in the final release."

I'm using 0 (zero), but when would I want to use 1?
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

Ionic Wind Support Team

When you don't want the default windows handler to do anything after you processed the message.

For example, you have a 'Quit' menuitem and during processing you close the window and delete the dynamically created window UDT.  Return TRUE or you'll get an exception as Windows will attempt to send another menu message.

During processing of WM_INITDIALOG the MS docs say to return TRUE if you set focus to a control. 

It depends on the message.

Paul.
Ionic Wind Support Team

Ionic Wind Support Team

Topic split and moved here as it was a more appropriate forum.
Ionic Wind Support Team