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. event handler question..

event handler question..

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 3 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.
  • T Offline
    T Offline
    trustno1
    wrote on last edited by
    #1

    hi everybody, i have a question regarding to event handler.. is it ok to bind multple menu command to a same function? i made a new menu for popup/context menu and some of the menu command is going to have the same functionaliy of the mainframe menu command. i was thinking of sharing the functions among the menu commands. e.g. on_command(id_a, onmyclick); on_command(id_b, onmyclick); thx in advance, have a nice weekend. :)

    C J 2 Replies Last reply
    0
    • T trustno1

      hi everybody, i have a question regarding to event handler.. is it ok to bind multple menu command to a same function? i made a new menu for popup/context menu and some of the menu command is going to have the same functionaliy of the mainframe menu command. i was thinking of sharing the functions among the menu commands. e.g. on_command(id_a, onmyclick); on_command(id_b, onmyclick); thx in advance, have a nice weekend. :)

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Yes, that will work fine. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002

      1 Reply Last reply
      0
      • T trustno1

        hi everybody, i have a question regarding to event handler.. is it ok to bind multple menu command to a same function? i made a new menu for popup/context menu and some of the menu command is going to have the same functionaliy of the mainframe menu command. i was thinking of sharing the functions among the menu commands. e.g. on_command(id_a, onmyclick); on_command(id_b, onmyclick); thx in advance, have a nice weekend. :)

        J Offline
        J Offline
        Jorgen Sigvardsson
        wrote on last edited by
        #3

        Even better: Let the two menuitems share the same id. Then you don't have two WM_COMMAND mappings. -- This space for rent.

        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