The information in this article applies to:
SYMPTOMSUsually, the intention while using the CWnd::GetCheckedRadioButton() function is to retrieve, from a group of option buttons, the ID of the one that is selected. However, if it is not used correctly, this function may return the ID of a selected button that lies outside a button group. CAUSEThe CWnd::GetCheckedRadioButton() function takes two arguments: nIDFirstButton -- the ID of the first option button.It returns the ID of the selected option button in a group of option buttons if both the following conditions hold:
-and- STATUSThis behavior is by design. MORE INFORMATIONThe GetCheckedRadioButton() function is designed as a counter-part to the CheckRadioButton() Windows API function prototyped here:
This function clears the selection from all buttons with IDs in the range
given by nIDFirstButton and nIDLastButton except the one whose ID is given
by nIDCheckButton.
The implementation of the CWnd::GetCheckedRadioButton() function works along the same lines. It cycles through each ID in the range given by nIDFirstButton and nIDLastButton querying each to find out which one is in a selected state. It returns as soon as it finds a selected option. Additional query words: 2.00 1.50 2.50 2.51 2.52 1.52b 3.00 2.10 3.10 2.20 3.20 4.00
Keywords : |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |