Aug 21, 2002 #1 Maurader Technical User Joined May 8, 2002 Messages 59 Location 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 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; ??
Aug 21, 2002 #2 sflam Programmer Joined Aug 13, 2001 Messages 69 Location US 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 Upvote 0 Downvote
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