Jump to content
  • Advertisement
Sign in to follow this  

Right Click Menu for Lesson 10

This topic is 4175 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

Hi all, I'm trying to get right click menu working for my C world based on this tutorial: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=10 For some reason nothing is happening when I right click.. The only two lines I can see that might be stopping it is this: NULL , // No Menu (inside if (!(hWnd=CreateWindowEx ) and wc.lpszMenuName = NULL; // We Don't Want A Menu after defining hInstance, wc.style etc. ..but i'm not sure what to set them as.. Here is my code for the menu (snipped) // create the skid sub menu int subMenu = glutCreateMenu(menu); glutAddMenuEntry("Turn Skid Off", 's0'); glutAddMenuEntry("Set Skid Normal", 's1'); // create the water sub menu int subMenu2 = glutCreateMenu(menu); glutAddMenuEntry("Placid Lake", 'w0'); glutAddMenuEntry("Average Current", 'w1'); // create the gravity sub menu int subMenu3 = glutCreateMenu(menu); glutAddMenuEntry("Earth", 'g1'); glutAddMenuEntry("Earth's Moon", 'g2'); // create main "right click" menu glutCreateMenu(menu); glutAddSubMenu("Set Skid Length", subMenu); glutAddSubMenu("Set Water Current", subMenu2); glutAddSubMenu("Set Planet Gravity", subMenu3); glutAddMenuEntry("Quit", 'q'); glutAttachMenu(GLUT_RIGHT_BUTTON); Any help would be great!

Share this post

Link to post
Share on other sites
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!