|
-
May 19th, 1999, 03:29 PM
#1
Radio Buttons?
I have three radio buttons IDC_RADIO1, IDC_RADIO2 and IDC_RADIO3 IDC_RADIO1 has the group property set and has a member variable (m_radioGrp) of type CButton and the other two do not have anything set. I am able to enable/disable the first button as I please, but can someone please tell me how to do the same for the other two? I have m_radioGrp.SetCheck(0) and this works fine on IDC_RADIO1, but I can't seem to get the other two Radio's to respond to anything! Please provide some code if possible and also can you
explain why m_radioGrp.CheckRadioButton(0,2,1) doesn't work? I also tried the Control ID numbers 1042,1044,1043 in place of 0,2,1 won't work either? Any assistance is greatly appreciated!
Thanks!
Charlie
Everything is Free Until You Have to Pay for it....
Platform is Windows 2000/XP Professional, Visual C++ 6.0
-
May 19th, 1999, 03:41 PM
#2
Re: Radio Buttons?
From what you have told me you only have one radio button that has a CButton that is associated with it. Try this instead of calling m_radioGrp.CheckRadioButton(...) call the CDialog version CheckRadioButton(...). That call is from the CWnd class, so even though you can call it with your CButton class, it doesn't make sense. You can either call the CheckRadioButton(...) or map 3 CButton classes (each of your radio buttons) and call the member functions such as SetCheck.
Wayne
-
May 19th, 1999, 04:33 PM
#3
Re: Radio Buttons?
THANK YOU VERY MUCH Wayne! The CDialog CheckRadioButton did the trick!
This has been a trial but thanks to you I can now get on with it! Thanks Again!
Everything is Free Until You Have to Pay for it....
Platform is Windows 2000/XP Professional, Visual C++ 6.0
-
May 19th, 1999, 04:44 PM
#4
Re: Radio Buttons?
Another method, is to set the group style for all the radio buttons, then in ClassWizard create member variables for each button. You can then go back and unselect the group style for the appropriate buttons. You can use EnableWindow() to enable/disable the buttons.
Rail
Recording Engineer/Software Developer
Rail Jon Rogut Software
[email protected]
http://home.earthlink.net/~railro/
-
May 20th, 1999, 09:21 AM
#5
Re: Radio Buttons?
Rail,
I thought about doing it that way, but couldn't figure out how to implement. You have provided enough info so I can give this a try as well.
Thanks!
Charlie
Everything is Free Until You Have to Pay for it....
Platform is Windows 2000/XP Professional, Visual C++ 6.0
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
|