可以考虑重载PreTranslateMessage函数,在此函数被第一次调用时,刷新菜单

解决方案 »

  1.   

    我没有重载DrawMenuBar(),应该还是调用它的父类的
      

  2.   

    我的意思是你主动调用一下父类的DrawMenuBar看看起不起作用
      

  3.   

    调用一下DrawMenuBar(),但是它并没有调用那三个函数进行重绘菜单
      

  4.   

    试了重载PreTranslateMessage(),也没有起作用:
    BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class
    if(pMsg->message   ==   WM_INITMENU){   
    this->OnInitMenu(pMenu); 
    }
    else {
    return CFrameWnd::PreTranslateMessage(pMsg);
    }
    }