CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    26

    More than one UI Message Handler

    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.


  2. #2
    Join Date
    May 1999
    Posts
    26

    Re: More than one UI Message Handler

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured