Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toolbar Event Handler problem HELP????

Status
Not open for further replies.

Sunny2

Programmer
Sep 11, 2003
15
CA
Hello guys,

Well, I am just trying to learn VC++.net. I ran into this small trouble, which doesn't make sense for me...

I created a MDI application(using MFC) with the default. Well, I just wanted to learn how to create my own tool bar, so I just deleted what ever MFC gave me and created a tool bar that will create a circle.

I named the ID as ID_DRAW_CIRCLE for the tool bar, also I created a menu item (draw) and submenu(circle) and I also named the submenu as ID_DRAW_CIRCLE.

Problem:

I ran into a problem, when I wanted to add an event handler, well, I clicked my view class and went to the events tab, but I don't see ID_DRAW_CIRCLE????? well, I know it should be there, but it's not there. But there is an ID called (32771), which I did not name. So if you guys ran into this trouble or if you could help me, I really appreciate it. thanks.

Sunny
 
I guess nobody replied for my solution yet. Well, this is what I have found so far.

I closed my whole application and then opened it again and checked what the ID for the submenu item(Circle) and found that it's 32771, I tried to change that to ID_DRAW_CIRCLE and save it and checked to add the event handler that didn't work. So I created brand new application and Named the ID again to ID_DRAW_CIRCLE, and now it works. that's strange huh. hehe. Well, I think the problem is that this is my guess, but that if it gives a default ID, it won't let me change it. that is my guess, any other suggestions??? I welcome it..


Sunny
 
Could anybody help meeee????? pleaseeeeee
 
first of all #include "resource.h" in files where you use ID_XXXXX. Second thing is to handle WM_COMMAND with wParam which equals to your ID_XXXXX.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top