event handler question..
-
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. :)
-
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. :)
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
-
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. :)
Even better: Let the two menuitems share the same id. Then you don't have two WM_COMMAND mappings. -- This space for rent.