我的窗口上有一个ReBar,我在窗口的WM_CREATE消息中使用MyReBar.ShowWindow(SW_HIDE),可以成功隐藏ReBar,但是我在菜单事件中使用MyReBar.ShowWindow(SW_HIDE)就失败,为什么?如何隐藏之,谢谢!!!

解决方案 »

  1.   

    CFrameWnd::ShowControlBar
    void ShowControlBar( CControlBar* pBar, BOOL bShow, BOOL bDelay );ParameterspBarPointer to the control bar to be shown or hidden.bShowIf TRUE, specifies that the control bar is to be shown. If FALSE, specifies that the control bar is to be hidden.bDelayIf TRUE, delay showing the control bar. If FALSE, show the control bar immediately.ResCall this member function to show or hide the control bar.