Hi,
How does one set a Dialog Check Box?
Michael B. Williams
Printable View
Hi,
How does one set a Dialog Check Box?
Michael B. Williams
CButton::SetCheck
It's not that simple; if it was I would not have posted. I was hoping for an example
In your dlg .cpp:
CButton* pCheck = (CButton*)GetDlgItem(IDC_MYCHECKID);
if(pCheck)
pCheck->SetCheck(1); // 1 to check, 0 to uncheck, 2 to set to indeterminate state
Or use class wiz to bind a CButton member to the check box and call its SetCheck method.
HTH,
Harvey
Harvey Hawes
Software Engineer
BioScience Analysis Software Ltd.
Masters Candidate
Cardiovascular/Respiratory Sciences
Faculty of Medicine
University of Calgary
Calgary, Alberta, Canada