checkbox

Pandiani

Member
Joined
May 30, 2004
Messages
13
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:

Code:
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!
 
The IDC is just a name into the resource file. If this is standard C++, youd best buy a book or start reading the help files :)

Or, if youre using Visual Studio .NET Id suggest trying a .NET C++ project as its much simpler to use.

As a side note: Since you only want one checkbox checked at a time, I think youd 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
 
Back
Top