Поделиться через


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

См. также

Основные понятия

CWnd Class

CWnd Members

Hierarchy Chart

CWnd::GetCheckedRadioButton

CButton::SetCheck

CheckRadioButton