-
June 6th, 2002, 08:56 AM
#1
Radio Button crashes program when clicked!?!!
Hi all,
I want to replace normal buttons by radio buttons. So far it works fine. But when i click the damned radio button the program hangs no error no nothing, it just hangs.
The methods called on click do nothing by now!
What i want to do is select one of tree options with those radio buttons and therefor i have first to lock them against each other (only one can be selected) and then change a variable. any ideas on how to do that??
Does MFC have a class for radio buttons such as CButton for normal buttons??
10x for the help
Regards
Mao_03
-
June 6th, 2002, 09:11 AM
#2
I'm not sure why your program would be crashing, but here is a link to a page that shows you how to add radio buttons to a dialog box:
http://msdn.microsoft.com/library/de...Dialog_Box.asp
If this doesn't bring you to the right page then enter Radio Buttons into the search box and click on the link for Grouping Radio Buttons on a Dialog Box.
I hope this helps.
-
June 6th, 2002, 09:12 AM
#3
I can't tell why your program hangs, 'cause you provide too few details.
Does MFC have a class for radio buttons such as CButton for normal buttons??
Yes! It's called.......CButton . Serious, now: Use the GetCheck() / SetCheck() member functions to see whether the radio is selected ot not.
-
June 6th, 2002, 09:41 AM
#4
Ok, i get a notification when the button is clicked:
afx-messagemap:
on_button_clicked(idc_radio_button_clicked, onradiobuttonclicked)
...
then when implementing the onradiobuttonclicked the function is empty (until the stops hanging !)
if i got you right, i could in this onradiobuttonclicked() function use the getcheck to see if it is checked or not. But since with the empty function the program hangs i expect it to hang too when i use getchecked.
Tricky?
CU
Ingo
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
|