Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Menus

Hi,

I've created a menu using the GUI in VS2005; I want to be able to hide it when my program logic tells it to hide.

I'm initially doing "windowClass.lpszMenuName = MAKEINTRESOURCE( IDR_MENU1 )" to register it inside of the WNDCLASSEX structure.

From what i've researched "EnableMenuItem()" would usually do the trick but I need to way to link up IDR_MENU1 to a HMENU struct to pass to the function?

Any help on how I can just toggle my menu on and off would be appreciated, cheers!

Comments

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : Hi,
    :
    : I've created a menu using the GUI in VS2005; I want to be able to
    : hide it when my program logic tells it to hide.
    :
    : I'm initially doing "windowClass.lpszMenuName = MAKEINTRESOURCE(
    : IDR_MENU1 )" to register it inside of the WNDCLASSEX structure.
    :
    : From what i've researched "EnableMenuItem()" would usually do the
    : trick but I need to way to link up IDR_MENU1 to a HMENU struct to
    : pass to the function?
    :
    : Any help on how I can just toggle my menu on and off would be
    : appreciated, cheers!

    [color=Blue]
    [link=http://msdn.microsoft.com/en-us/library/ms647995(VS.85).aspx]http://msdn.microsoft.com/en-us/library/ms647995(VS.85).aspx[/link]

    [color=Green]Hiding a menu:[/color]

    1. Using GetMenu() get the handle off the window and save that handle for future to attach the menu back.

    2. Using SetMenu (NULL) will remove the menu bar

    [color=Green]Showing it back:[/color]

    1. Use SetMenu ()
    [/color]
Sign In or Register to comment.