|
-
May 11th, 1999, 08:04 PM
#1
radio buttons
I have a propertysheet that contains three radio buttons all grouped together. does anyone know of a way to figure out which radio button has been selected and also how to get the value of that radio button. I need to save the vales to the registry so I can use them at a later date when I restart the application.
Cheers
-
May 11th, 1999, 09:11 PM
#2
Re: radio buttons
If you are using Visual C++, you can associate the radio button group to a member variable.
Look at the Class Wizard / Member Variables section, then you may find the ID of the first
radio button control. Associate it with an integer variable.
When you call UpdateData(TRUE) from your dialog box, the integer value will be 0 if the first
radio button is selected, 1 if the second is selected, and so on.
-
May 12th, 1999, 05:05 AM
#3
Re: radio buttons
Very easy is to find out which button is pressed:
int id;
id=GetCheckedRadioButton(ID_BFirst,ID_BLast);
id will be the ID number of the checked radio button. You must ensure that the first button ID_BFirst starts a group.
possible trouble
Buttons must be created in the right order, otherwise you have to manage by yourself number of ID in the resource file (be carefull!!!)
hope this will help
Yves Le Sant
Metrology and Measurement Unit
Fundamental and Experimental Aerodynamics Departement
ONERA Meudon
(Office National d'Etudes et de Recherches Aérospatiales)
FRANCE
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|