Sign in to follow this  

Right Click Menu for Lesson 10

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

This topic is 3863 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this