Link to home
Start Free TrialLog in
Avatar of BlackRussian
BlackRussian

asked on

How do I create handler for toolbar and menu items in Studio.net

Hello, I'm moving from C++ 6.0 to .net. I created a custom toolbar and want to create handlers for each item. When I select the toolbar in resource view and select the iocn. My property page doesn't show a message or event button. Show how do I add a handler?
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AlexFM
AlexFM

And don't waste your points clicking twice on the Submit button :-)
You can delete the duplicate question while it hasn't comments.
Avatar of AndyAinscow
When the .net came out I gave it a try (didn't like some things so I am still with VC 6).  One thing I didn't like was that one seems to be what could be here.
If you do not have a menu then the wizard doesn't seem to be able to hook a (toolbar) button up to an event.  Solution.  Create a menu with the same ID as that of your button and hook the menu event with the wizard.  (The menu doesn't have to be visible in your app - it's just there for the wizard to automate tasks for you).
Yes, Wizard support in VC++ 6 is better than in .NET. The only function available in .NET is adding message handlers and member variables. User should make more things manually.
BlackRussian, Andy's idea is good. You can see also how command message handler is added in the text of the program and do the same manually.

By the way, Black Russian - this is from "Naked Gun"?