Jump to content
  • Advertisement

Archived

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

yanuart

Hiding my menu bar

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

I want to hide my menu bar (i''m using WS_POPUP to make my window fullscreen) but I''ve read in msdn that a menu bar is always visible, but I think I''ve seen an application (running fullscreen, probably with WS_POPUP) has the ability to hide/unhide its menu bar. Can we really do this using MFC ??

Share this post


Link to post
Share on other sites
Advertisement
Delete the menu bar (while retaining the handle to the actual menu elsewhere within the application), then re-create it when you wish to "unhide".

Share this post


Link to post
Share on other sites
Yes, as Oluseyi said, call SetMenu with a parameter of NULL to un-attach a window''s menu without destroying it. Make sure to hang on to the HMENU handle (if you don''t have one beforehand, call GetMenu to get it right before). When you want to reattach the menu, just call SetMenu again with the original HMENU handle.

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!