Sign in to follow this  

Disabling File Menu

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this