|
-
May 25th, 1999, 09:45 PM
#1
routing command messages
this is probably not beginner stuff but i couldn't think of any other place it belongs.
Anyway, i have a dialog bar based on a derived CDialogBar class and a command handler in the MainFrame for a button on this dialog bar.
This all works ok, but now i want to also handle the same button click in the derived CDialogBar class to do some pre-processing before the main frame gets it. but it dont work! the command message seems to get consumed by the first handler the framework finds for it, which in this case is the CDialogBar derived class, and the main frame never gets the message.
so, what i'm trying to say is can i continue routing a command meesage through the rest of the framework even after i've handled it in a particular class?
-
May 25th, 1999, 10:29 PM
#2
Re: routing command messages
Have you tried
ON_MESSAGE(WM_COMMAND, ID_MYCOMMAND, OnMyCommand)
instead of
ON_COMMAND(ID_MYCOMMAND, ...)
If OnMyCommand returns 0, the message should be sent back to the frame.
-
May 25th, 1999, 11:42 PM
#3
Re: routing command messages
thanks! you got me pointed in the right direction and i found an even easier way using ON_COMMAND_EX. This allows the handler to return FALSE if you want to continue routing the message.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|