🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Right Click Menu for Lesson 10

Started by
-1 comments, last by nomis1 17 years, 1 month ago
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!

This topic is closed to new replies.

Advertisement