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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding menus 1

Status
Not open for further replies.

rezzij

Instructor
Mar 30, 2004
48
US
Brand new to c++ and am trying to implement menus in an MFC SDI ... have created a menu heirarchy in resource editor, added handlers as commands, but I can not get the menu to appear on the dialog when the app is built - can anyone tell me what I am missing ?

thanks
 
In your CMainFrame class' constructor do you use the Create function's sixth parameter?

Code:
Create(NULL,"First Menu",WS_OVERLAPPEDWINDOW,CRect(0,0,90,90),NULL,MAKEINTRESOURCE(IDR_MENU1/*Menu's resource ID*/));

-Bones
 
Well, emphasizing that I am a total beginner, I do not have any of the entire line ? In the resource view, I have an item (IDR_MENU1) in the menu area - after making the menu I have the option of associating it with a new class or an existing, and I have been associating it with the main dialog. I am getting most of this out of a book, but they seem to be missing a chunk?
 
Bring up the dialog on the resource editor, right click, and go to properties. Then select the desired menu from the menu combo box. That's all you need to do.
 
got it finally - thanks! freaking simple too!

thanks tons!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top