|
-
May 31st, 1999, 03:08 AM
#1
How to make the radio buttons read only?
I have got some radio buttons grouped in my dialog box. I want to make them read only (i.e they should not be checked).
-
May 31st, 1999, 03:45 AM
#2
Re: How to make the radio buttons read only?
Hi,
I think all you have to do is to click on the "disabled" checkbox corresponding to that radio button.
-
May 31st, 1999, 04:18 AM
#3
Re: How to make the radio buttons read only?
Actaully,I want to do it programmatically.
-
May 31st, 1999, 07:31 AM
#4
Re: How to make the radio buttons read only?
Then use ::EnableWindow () to do it.
-
June 1st, 1999, 04:22 AM
#5
Re: How to make the radio buttons read only?
Sir, I dont understand how will it work? I read the Help, it says its used for entire dialog box. I want to enable or disable a particular radio button programmatically.
-
June 1st, 1999, 05:48 AM
#6
Re: How to make the radio buttons read only?
Hi:
You should get the handle of the radio-button from the
control's ID (for example, IDC_RADIO1), by using this API :
HWND hRadio1 = GetDlgItem (hDlg, IDC_RADIO1) ;
And then, you can use EnableWindow () like this :
EnableWindow (hRadio1, FALSE) ;
And the radio button will be disabled and grayed.
For simple, you can just write your code like this :
EnableWindow (GetDlgItem (hDlg, IDC_RADIO1), FALSE) ;
Bye
Best Regards !
-- Dang --
-
June 1st, 1999, 08:11 PM
#7
Re: How to make the radio buttons read only?
Hi,
Try this:
GetDlgItem(IDC_RADIO)->EnableWindow(FALSE);
Hope that works.
Chao
-
June 2nd, 1999, 02:22 AM
#8
Re: How to make the radio buttons read only?
Thanks its working fine. Actually your help came right on time. Atleast two hours before my demo.
Zulfi.
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
|