Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ON_COMMAND_EX

ON_COMMAND_EX

Scheduled Pinned Locked Moved C / C++ / MFC
architecturequestion
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rockone
    wrote on last edited by
    #1

    it seems that ON_COMMAND_EX just works in doc/view architecture. Can anyone give me some tips about it? thank you.

    A D M 3 Replies Last reply
    0
    • R Rockone

      it seems that ON_COMMAND_EX just works in doc/view architecture. Can anyone give me some tips about it? thank you.

      A Offline
      A Offline
      ashukasama
      wrote on last edited by
      #2

      have a look http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=514836&SiteID=1 http://www.codeguru.com/forum/showthread.php?t=61254 http://www.codeguru.com/forum/showthread.php?t=216400 :)

      R 1 Reply Last reply
      0
      • A ashukasama

        have a look http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=514836&SiteID=1 http://www.codeguru.com/forum/showthread.php?t=61254 http://www.codeguru.com/forum/showthread.php?t=216400 :)

        R Offline
        R Offline
        Rockone
        wrote on last edited by
        #3

        Thank you for your reply. I already google it and search it on codeproject and codeguru before posting this message. Yes, it works well for Doc & View architecture. my architecture is CMainFrame and CMyView (derived form CWnd, not CView) and without Doc. And it has a custom tool bar and a custom status bar.

        1 Reply Last reply
        0
        • R Rockone

          it seems that ON_COMMAND_EX just works in doc/view architecture. Can anyone give me some tips about it? thank you.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Do you need ON_COMMAND_EX() instead of ON_COMMAND().


          "A good athlete is the result of a good and worthy opponent." - David Crow

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          R 1 Reply Last reply
          0
          • R Rockone

            it seems that ON_COMMAND_EX just works in doc/view architecture. Can anyone give me some tips about it? thank you.

            M Offline
            M Offline
            Mark Salsbery
            wrote on last edited by
            #5

            I'm not sure why you think it ONLY works in doc/view.  :) Mark

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            R 1 Reply Last reply
            0
            • D David Crow

              Do you need ON_COMMAND_EX() instead of ON_COMMAND().


              "A good athlete is the result of a good and worthy opponent." - David Crow

              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

              R Offline
              R Offline
              Rockone
              wrote on last edited by
              #6

              I need process the message in the child window and parent window. child window uses ON_COMMAND_EX and parent window uses ON_COMMAND.

              D 1 Reply Last reply
              0
              • M Mark Salsbery

                I'm not sure why you think it ONLY works in doc/view.  :) Mark

                Mark Salsbery Microsoft MVP - Visual C++ :java:

                R Offline
                R Offline
                Rockone
                wrote on last edited by
                #7

                I already try some cases, it works well in doc/view case. I get some source codes from sourceforge.net, it uses ON_COMMAND_EX and is not doc/view case. it just has CMainFrame and a view derived from CWnd, without doc.

                1 Reply Last reply
                0
                • R Rockone

                  I need process the message in the child window and parent window. child window uses ON_COMMAND_EX and parent window uses ON_COMMAND.

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  Rockone wrote:

                  I need process the message in the child window and parent window.

                  Why would you need to do this?


                  "A good athlete is the result of a good and worthy opponent." - David Crow

                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                  R 1 Reply Last reply
                  0
                  • D David Crow

                    Rockone wrote:

                    I need process the message in the child window and parent window.

                    Why would you need to do this?


                    "A good athlete is the result of a good and worthy opponent." - David Crow

                    "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                    R Offline
                    R Offline
                    Rockone
                    wrote on last edited by
                    #9

                    just add if ( m_wndToolBar.OnCmdMsg(...) ) { return TRUE; } in function CMainFrame::OnCmdMsg(...) before return default process.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups