Jump to content
  • Advertisement
Sign in to follow this  

Disabling File Menu

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

Hello all, I cannot figure out how to disable the menu key ( alt key ) in a windowed application. Both the MFC & Win32 Nehe basecode have this "problem", where if you press alt during the program the window will cease to update, because you have selected the "file" menu. If you hit enter after pressing alt it will actually bring the file menu up. One would generally assume the that sending in NULL for the hMenu paramater to CreateWindow() or CreateWindowEx() would get rid of the menu, but looking into the msdn specifying NULL for that parameter just gives you a default class menu: hMenu [in] Handle to a menu, or specifies a child-window identifier, depending on the window style. For an overlapped or pop-up window, hMenu identifies the menu to be used with the window; it can be NULL if the class menu is to be used. For a child window, hMenu specifies the child-window identifier, an integer value used by a dialog box control to notify its parent about events. The application determines the child-window identifier; it must be unique for all child windows with the same parent window. The problem gets a little more complex with MFC i supppose, since you arent calling CreateWinow at all. Anyone know how to disable the file menu completely? -gf

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!