Export (0) Print
Expand All
MFC
Expand Minimize

CWnd::CheckRadioButton

Selects (adds a check mark to) a given radio button in a group and clears (removes a check mark from) all other radio buttons in the group.

void CheckRadioButton( 
   int nIDFirstButton, 
   int nIDLastButton, 
   int nIDCheckButton  
);

nIDFirstButton

Specifies the integer identifier of the first radio button in the group.

nIDLastButton

Specifies the integer identifier of the last radio button in the group.

nIDCheckButton

Specifies the integer identifier of the radio button to be checked.

The CheckRadioButton function sends a BM_SETCHECK message to the specified radio button.

// Of the 4 radio buttons, selects radio button 3. 
void CMyDlg::OnMarkRadio() 
{
   CheckRadioButton(IDC_RADIO1, IDC_RADIO4, IDC_RADIO3);   
}

Header: afxwin.h

Community Additions

ADD
Show:
© 2014 Microsoft