-
March 3rd, 2005, 08:48 AM
#1
CheckBox simple
how to check the checkbox by code?
-
March 3rd, 2005, 08:52 AM
#2
Re: CheckBox simple
Originally Posted by Anandforyou
how to check the checkbox by code?
Try...
Code:
SendMessage(BM_SETCHECK, BST_CHECKED, 0); // To Check...
SendMessage(BM_SETCHECK, BST_UNCHECKED, 0); // To UnCheck...
Hope this helps,
Regards,
Usman.
-
March 3rd, 2005, 09:01 AM
#3
Re: CheckBox simple
Originally Posted by usman999_1
Try...
Code:
SendMessage(BM_SETCHECK, BST_CHECKED, 0); // To Check...
SendMessage(BM_SETCHECK, BST_UNCHECKED, 0); // To UnCheck...
Hope this helps,
Regards,
Usman.
There is also:
Code:
CButton *pCheckBox = (CButton *)GetDlgItem( IDC_MY_CHECKBOX);
pCheckBox->SetCheck( BST_CHECKED ); // To Check...
pCheckBox->SetCheck( BST_UNCHECKED ); // To UnCheck...
Both work.
-
March 3rd, 2005, 11:29 AM
#4
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
|