DEV/C++

[MFC] CheckBox, RadioButton 체크 옵션

retire 2021. 7. 5. 16:19

MFC에서 체크박스나 라디오버튼 체크 옵션

SetCheck(TRUE); 함수 사용한다

 

 
 CButton* pButton;
 pButton = (CButton*)GetDlgItem(IDC_RADIOBUTTON);
 pButton->SetCheck(TRUE);

하거나,

 

IDC_RADIOBUTTON 의 컨트롤 멤버변수 설정해서

멤버변수가 m_radiobutton 이라면,

 
m_radiobutton.SetCheck(TRUE);