Advertisement

OT: Enabling a radio button

Started by December 25, 2001 03:47 PM
4 comments, last by Sketchy 23 years, 1 month ago
Hey, I made a dialog box using VC++ 6, and it has a bunch of radio buttons on it. I''m trying to figure out how to send a message to a radio button to enable/disable it. I thought I should use SendDlgItemMessage() or something. I just cant find the good old setEnabled(true) (ala VB). Any help would be great...
The function that your looking for is:
BOOL CheckDlgButton(
HWND hDlg, // handle to dialog box
int nIDButton, // button-control identifier
UINT uCheck // check state
);.
At least that''s what I use.

Merry Christmas,
Nyko

Advertisement
When you say VC6, do you mean with MFC?

All you need to do in that case is link a variable (ctrl + w), and modify it the select the radio button you want.

Dont forget to use UpdateData(FALSE); after the change.
www.EberKain.comThere it is, Television, Look Listen Kneel Pray.
I don''t think I''m using MFC, but I don''t know for sure.

I created the app using the "no MFC" option. I added the dialog box as a resource, and just added the buttons to it.
You''d know if you was using MFC

I dont have the answer offhand but if you have the MSDN library try searching through that for the dialog button class - the answer will be there
Hi,

On my site, I''ve a little example for displaying a dialog box with radio button.

========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/

This topic is closed to new replies.

Advertisement