有关工具栏的问题:MFC向导生成的工具栏中的COPY\CUP\等三个按钮可以自动地显隐,这是怎样做到的呢?具体用到了什么API函数?还有如果在控件当中选择了文本(EDIT控件)会引发什么事件呢?

解决方案 »

  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.注:toolbar的基类就是controlbar