解决方案 »

  1.   

    有子窗口就显示IDR_AppNameTYPE
    没有子窗口就显示IDR_MAINFRAME
    你看看IDR_AppNameTYPE是不是包含了IDR_MAINFRAME
      

  2.   

    在App中:
    void CXXApp::PreLoadState()
    {
    GetContextMenuManager()->AddMenu(_T("树的右键菜单"), IDR_MENU1);
    SetSkins();
    }在子窗口中实现消息:
    ON_WM_CONTEXTMENU()
    void CTabMainWnd::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
     {
     CPoint ptTree = point;
     HMENU hMenu = theApp.GetContextMenuManager()->GetMenuById(IDR_MENU_MAIN_WND); 
     theApp.GetContextMenuManager()->ShowPopupMenu(IDR_MENU_MAIN_WND, point.x, point.y, GetParent(),TRUE);
     }
    具体的视你自己的情况而定