我估计你用的是vs2008sp1把你看看它的框架类是不是CFreameWndEx继承过来的。。
重新建立但文档工程,看看修改风格,采用传统的风格,我记得有个修改后框架就能从CFreamwnd继承,就ok拉。。其实就是把应用程序类型中的项目类型设为mfc标准,然后点用户界面功能把命令行那选使用经典菜单。

解决方案 »

  1.   

    The GetMenu function retrieves a handle to the menu assigned to the specified window.
    Syntax
    CopyHMENU GetMenu(
      __in  HWND hWnd
    );
    ParametershWnd [in]
        HWND    Handle to the window whose menu handle is to be retrieved. Return ValueHMENUThe return value is a handle to the menu. If the specified window has no menu, the return value is NULL. If the window is a child window, the return value is undefined.
    ResGetMenu does not work on floating menu bars. Floating menu bars are custom controls that mimic standard menus; they are not menus. To get the handle on a floating menu bar, use the Active Accessibility APIs.是不是你要获取的是浮动工具栏?
      

  2.   

    lz问的是C#,不是MFC/C++lz用SPY++看看得到的handle正确否?
      

  3.   

    vs2005、2008里面那种模仿Office2003的菜单不是标准的主菜单。换用MainMenu代替MenuStrip。
      

  4.   

    很久以前做的,有点忘了。。只是获取一级菜单的话GetMenu后面应该可以设参数的吧比如0,1,具体网上应该有例子