判断checkbox选中
if (BST_CHECKED == IsDlgButtonChecked(IDC_CHECK_UNDER))
// TODO: Add your control notification handler code here
switch (this->IsDlgButtonChecked(IDC_CHECK1))
{
case BST_CHECKED:
AfxMessageBox("选中");
break;
case BST_UNCHECKED:
AfxMessageBox("未选中");
break;
case BST_INDETERMINATE:
AfxMessageBox("已灰化不可操作");
break;
}