how to check the checkbox by code?
Printable View
how to check the checkbox by code?
Try...Quote:
Originally Posted by Anandforyou
Hope this helps,Code:SendMessage(BM_SETCHECK, BST_CHECKED, 0); // To Check...
SendMessage(BM_SETCHECK, BST_UNCHECKED, 0); // To UnCheck...
Regards,
Usman.
There is also:Quote:
Originally Posted by usman999_1
Both work.Code:CButton *pCheckBox = (CButton *)GetDlgItem( IDC_MY_CHECKBOX);
pCheckBox->SetCheck( BST_CHECKED ); // To Check...
pCheckBox->SetCheck( BST_UNCHECKED ); // To UnCheck...
thanks. both works well.