Solved

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

Posted on 2003-12-10
7
219 Views
Last Modified: 2013-11-20
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?
0
Comment
Question by:BlackRussian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
7 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 250 total points
ID: 9910550
The Properties window has small icons in it's top part: Properties, Events etc. Click Events (or Messages - I don't remember exactly) and add the handler.
The handlers are added not to toolbar itself, they are added to other windows to which it belongs - like CMainFrame, view etc.
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 9910555
And don't waste your points clicking twice on the Submit button :-)
You can delete the duplicate question while it hasn't comments.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 9910880
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).
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 9910956
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"?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sum28 challenge 31 117
unix example issues 18 113
Way to decrease size of apk file 9 132
Bartender label printing - switch on and off graphics 3 94
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question