Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

adsshepherd

OpenGL Main Menu

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

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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

  • 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!