Click to See Complete Forum and Search --> : More than one UI Message Handler


Sergio Acosta
May 29th, 1999, 04:45 PM
Can I have more than one message handler function for a single command ID?.

I want more than one object to be notified automaticaly (via ClassWizard/Message Map) when a toolbar button is pressed.

Starting from a new SDI AppWizard project, I created a toolbar button ID_CMD_SOMETHING and I used ClassWizard to handle the message in both CMyView and CMyDoc classes, but it is only working in CMyView.

Then I did the same for CMainFrame and I kept only receiving the message in CMyView.

When I comment two of the tree functions (declarations, message map entries and bodies) the other one does work no matter which one is.

Can anybody give me a hint?, please. Thank you very much in advance.

Sergio Acosta
May 29th, 1999, 05:04 PM
OK, I should have searched the bbs first. I'm going to try ON_COMMAND_EX as suggested by Paul Burns.

But if you have any other comment I would like to hear it.