Jump to content
  • Advertisement
Sign in to follow this  
neilp85

win32 menus using resource scripts with dev-C++

This topic is 4706 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using dev-C++ and can't get a simple menu I made with a resource script to appear when the program is executed. The icons are working just fine but there is no menu created. I've looked through several different tutorials and haven't gotten any of the different ways I've seen to work. Here is what I've tried using the two resource files that follow: // the menu doesn't appear with either of these wc.lpszMenuName = (LPSTR)LoadMenu(hThisInstance,MAKEINTRESOURCE(IDR_MYMENU)); wc.lpszMenuName = MAKEINTRESOURCE(IDR_MYMENU); // this way doesn't even compile wc.lpszMenuName = LoadMenu(hThisInstance,MAKEINTRESOURCE(IDR_MYMENU)); //resource.h #define IDR_MYMENU 101 #define IDI_MYICON 201 #define ID_FILE_EXIT 4001 //resource.rc #include "resource.h" IDI_MYICON ICON "src/my_icon.ico" IDR_MYMENU MENU BEGIN POPUP "&File" BEGIN MENUITEM "E&xit", ID_FILE_EXIT END END I've also tried each of these ways using the IDR_MYMENU identifier as a string instead of a numeric constant but that didn't work either. Could someone please help me out.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!