CButton::SetButtonStyle

void SetButtonStyle( UINT nStyle, BOOL bRedraw = TRUE );

Parameters

nStyle

Specifies the button style.

bRedraw

Specifies whether the button is to be redrawn. A nonzero value redraws the button. A 0 value does not redraw the button. The button is redrawn by default.

Remarks

Changes the style of a button.

Use the GetButtonStyle member function to retrieve the button style. The low-order word of the complete button style is the button-specific style.

Example

CButton myButton;

// Create an auto 3-state button.
myButton.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, 
   CRect(10,10,100,30), pParentWnd, 1);

// Actually, want an auto check box, change the button style to 
// auto check box.
myButton.SetButtonStyle( BS_AUTOCHECKBOX );

CButton OverviewClass MembersHierarchy Chart

See Also   CButton::GetButtonStyle, BM_SETSTYLE