希望将Button设置为BS_AUTOCHECKBOX风格

解决方案 »

  1.   

    Call this member function to set the button's command ID, style, and image number.void SetButtonInfo(
       int nIndex,
       UINT nID,
       UINT nStyle,
       int iImage 
    );
    Parameters
    nIndex 
    Index of the button or separator whose information is to be set. 
    nID 
    The value to which the button's command ID is set. 
    nStyle 
    The new 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 
    TBBS_DROPDOWN   Creates a drop-down list button. 
    TBBS_AUTOSIZE   The button's width will be calculated based on the text of the button, not on the size of the image. 
    TBBS_NOPREFIX   The button text will not have an accelerator prefix associated with it. 
    iImage 
    New index for the button's image within the bitmap. 
      

  2.   

    这是哪个控件的member function ?
      

  3.   

    我上面说错了,不是在工具栏是CDialogBar  m_wndDlgBar,请问怎样设置能使之象CToolBar    m_wndToolBar的风格???
      

  4.   

    得到m_wndDlgBar的指针,在得到DLG上BUTTON的指针,使用SetButtonStyle