Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi, I have the following problem:

 

I have two check boxes on my dialog form, thir IDs are:

IDC_CHECK1

IDC_CHECK2

 

I want to make that when user check check box 1other chackbox becaome unchecked. This means that in the same time only one can be checked.

When I double click check box 1 I get into the fuction:

 

void CFIRDsgnDlg::OnBnClickedCheck1()
{
// TODO: Add your control notification handler code here
}

 

I tried with something like this:

ID_CHECK2=false;

but no succes.

Please help!

  • *Experts*
Posted

The IDC is just a name into the resource file. If this is standard C++, you'd best buy a book or start reading the help files :)

 

Or, if you're using Visual Studio .NET I'd suggest trying a .NET C++ project as it's much simpler to use.

 

As a side note: Since you only want one checkbox checked at a time, I think you'd be better off using radio buttons. A radio button has this behavior by default (only one radio button in a group can be checked at a time).

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...