Need help with radio button
I Have two radio button and i have enabled 'Group' Property for one of the radio button.
When i launch the application the both the radio buttons remains unselected, I want one of the radio button to be selecetd by default when the appliaction starts up.
Please help me
RK :-)
[309 byte] By [
poshyradha] at [2007-11-20 11:40:02]

# 1 Re: Need help with radio button
I Have two radio button and i have enabled 'Group' Property for one of the radio button.
When i launch the application the both the radio buttons remains unselected, I want one of the radio button to be selecetd by default when the appliaction starts up.
Please help me
RK :-)Are you using an MFC dialog? If so, create a member variable associated with the first button in the group, then look in the dialog's constructor. The value will be set to -1. Change it to 0 or 1.
Also make sure that the tab order of all of your controls in the dialog are correct (Layout/Tab Order in VS6. The two radio buttons should be followed by another control with a group attribute.
If you don't want to use a member variable you could use CWnd::CheckRadioButton().
# 2 Re: Need help with radio button
Hi
Thanks for your reply,
of what type Should the member variable be, is it should be of type int?
sorry for bothering you with silly questions. I am a starter, tha is why?
# 4 Re: Need help with radio button
int. If it's 0, the first button is checked. If it's 1, the second is checked, etc. - assuming you're using the DDX functionality.
GCDEF at 2007-11-10 22:27:38 >
