比如我想隐藏我的程序中主菜单的"工具->选项"的这一项, 应该如何做呢?

解决方案 »

  1.   

    RemoveMenu
    The RemoveMenu function deletes a menu item or detaches a submenu from the specified menu. If the menu item opens a drop-down menu or submenu, RemoveMenu does not destroy the menu or its handle, allowing the menu to be reused. Before this function is called, the GetSubMenu function should retrieve a handle to the drop-down menu or submenu. BOOL RemoveMenu(
      HMENU hMenu,     // handle to menu
      UINT uPosition,  // menu item identifier or position
      UINT uFlags      // options
      

  2.   

    多谢.
    能不能在详细点呀, 我这台机器上没有装msdn:(
    我想在隐藏后又可以恢复. 另外hMenu怎么得到呢?
      

  3.   

    see the samples below, useful: http://www.codeproject.com/menu/dynmenu.asp
    http://www.codeproject.com/menu/dynitems.asp