Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

button group

Status
Not open for further replies.

Maurader

Technical User
May 8, 2002
59
0
0
CA
if i have a radio button group, how can i determine the index of the radio button that is currently selected without saying

Updata(true);
int index = m_button;

??
 
If the IDs of the groups of radio button is consecutive, you can use:
Code:
    int iCheckedID = GetCheckRadioButton(ID_FIRST_RADIO, ID_LAST_RADIO);
    int iCheckedIndex = iCheckedID - ID_FIRST_RADIO;
If the IDs are not consecutive, you have to construct the index using multiple IsDlgButtonChecked().

HTH
Shyan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top