如何弄呀?setcheck还是pressbutton?thanks

解决方案 »

  1.   

    很简单啊,在创建工具条的时候,创建完成,再调用语句  
    m_toolbar.setButtonStyle(int index, WORD style);就OK了啊,
      

  2.   

    CToolBar::SetButtonStyle
    void SetButtonStyle( int nIndex, UINT nStyle );ParametersnIndexIndex of the button or separator whose information is to be set.nStyleThe button style. The following button styles are supported: TBBS_BUTTON   Standard pushbutton (default)
    TBBS_SEPARATOR   Separator
    TBBS_CHECKBOX   Auto check-box button
    TBBS_GROUP   Marks the start of a group of buttons
    TBBS_CHECKGROUP   Marks the start of a group of check-box buttons 
    例子:
    m_wndToolBar.SetButtonStyle(11,TBBS_CHECKBOX);注意啊,在数nIndex的时候要把分隔符数进去哦,还有第一个应该从0开始数起!