Advertisement

OpenGL Main Menu

Started by April 19, 2002 05:56 PM
3 comments, last by adsshepherd 22 years, 10 months ago
Hey Dudes... Does anyone have any idea why i cant get a normal windows menu to show up in the OpenGL framework on nehe''s site?? Menus for me usually work fine, I cant get anything to show up on the openglwindow...any ideas?? Cheers Adam
It''s just not written in the code... I don''t know much about Win32, so I don''t know what you need to write to get a menu, but it''s just not in there. There should be some extra statements you need... try finding a tutorial on Win32.
______________________________Pretty guy for a white fly.
Advertisement
First write this to your resource file:

OPENGLMENU MENU DISCARDABLE
BEGIN
POPUP "File"
BEGIN
MENUITEM "Option 1", 101
MENUITEM "Option 2", 102
END
END

and from Nehe''s code
chance this line:

wc.lpszMenuName=NULL;

to look like this:

wc.lpszMenuName="OPENGLMENU";
Hi!

If you''ve created the menu correctly, but still it doesn''t appear, you should check WM_PAINT to see if the default message handler gets called.

I came across this problem for the first time I tried mixing OGL and menus, and the solution is to call the handler manually.

good luck!
.. and you''ve probably to adjust the height of the opengl part of the window according to the height of the menu ...

@$3.1415rin

This topic is closed to new replies.

Advertisement