Click here to Skip to main content
12,351,441 members (37,015 online)

C / C++ / MFC

 
QuestionHow to get which Radio button is Checked? Pin
Anurag Kela10-Oct-12 2:14
memberAnurag Kela10-Oct-12 2:14 
AnswerRe: How to get which Radio button is Checked? Pin
_AnsHUMAN_ 10-Oct-12 2:29
group_AnsHUMAN_ 10-Oct-12 2:29 
QuestionRe: How to get which Radio button is Checked? Pin
DavidCrow10-Oct-12 2:38
memberDavidCrow10-Oct-12 2:38 
AnswerRe: How to get which Radio button is Checked? Pin
«_Superman_»10-Oct-12 19:48
member«_Superman_»10-Oct-12 19:48 
I'm assuming you're using an MFC based dialog application.
If this assumption is right, read on.

For the first radio button of each group, set its Group property to True.
Right click on this radio button and select Add Variable and create an integer variable.
The above step is only possible with a radio button whose Group property is set to True.

To get the user selection, simply call UpdateData() and the integer variable will contain the 0-based index of the selected radio button.
«_Superman 
I love work. It gives me something to do between weekends.


Microsoft MVP (Visual C++)

Polymorphism in C

Questionfile is getting deleted Pin
sarfaraznawaz10-Oct-12 0:29
membersarfaraznawaz10-Oct-12 0:29 
AnswerRe: file is getting deleted Pin
sirama200410-Oct-12 0:33
membersirama200410-Oct-12 0:33 
GeneralRe: file is getting deleted Pin
sarfaraznawaz10-Oct-12 2:06
membersarfaraznawaz10-Oct-12 2:06 
QuestionRe: file is getting deleted Pin
DavidCrow10-Oct-12 2:40
memberDavidCrow10-Oct-12 2:40 
AnswerRe: file is getting deleted Pin
sarfaraznawaz10-Oct-12 3:17
membersarfaraznawaz10-Oct-12 3:17 
GeneralRe: file is getting deleted Pin
Andrew Cherednik10-Oct-12 11:32
memberAndrew Cherednik10-Oct-12 11:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.160621.1 | Last Updated 26 Jun 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid