Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Sketchy

OT: Enabling a radio button

This topic is 6020 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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/

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!