Obtaining and Setting a Checkbox State
Does anyone know how to get the Checkbox state, if it is NOT in a dialog box? I have this code, but its not working..
Code:
case WM_COMMAND:
{
switch(LOWORD(wParam))
{
case IDC_START:
{
UINT cLogoff;
cLogoff = IsDlgButtonChecked(hLogoff, IDC_LOGOFF);
if(cLogoff == BST_CHECKED)
{
CheckDlgButton(hShutdown, IDC_SHUTDOWN, BST_UNCHECKED);
CheckDlgButton(hRestart, IDC_RESTART, BST_UNCHECKED);
bLogoff = true;
bShutdown = false;
bRestart = false;
}
}
break;
}
}
break;