Advertisement

menu/button

Started by October 02, 2003 03:06 PM
1 comment, last by Harvestr 21 years, 5 months ago
Trying to add a menu/mouse button but so far I''ve only seen GLUT based ones. I looked around and couldn''t find anything else...so I was wondering if anyone could direct/tell me how to do that with say the ''nehe window'' ? thanks in advance, and *blush* hope it hasn''t been mentioned/explained somewhere before
Here''s a link to some Win32 tutorials that show how to do menus and dialogs.
http://www.gametutorials.com/Tutorials/win32/Win32_Pg2.htm
The code to download is for .NET instead of VC++ 6 but if you just make your own project and include the .c/.cpp files, .h files and .rc files everything should work fine.
Hope that helps!
"If all else fails, lower your standards."
Advertisement
Yes, just using the Win32 API is one popular option. Another is to combine ortho mode and 3D mode, for example you can have your 3D scene and then when the user hits M you can draw some rectangles in 2D with pictures on them for the user to click, then just use PeekMessage and WndProc to find where the user clicked the mouse, and if it was over a button, do your code from there.

In my city demo on my page, I do stuff in 3D and 2D mode and the code is in the routine DoOrthoModeRendering. It''s pretty awful code but it illustrates another way of doing it.

Good luck!

Love means nothing to a tennis player

My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)

This topic is closed to new replies.

Advertisement