According to the documentation , the flag is ODS_CHECKEDapplicable only to menu items:
ODS_CHECKED This bit is set if the menu item should be checked. This bit is used only in the menu.
Instead, to determine the checked state of a button, you must call a function CButton::GetCheck. It will return one of the following values:
BST_UNCHECKED
BST_CHECKED
BST_INDETERMINATE ( BS_3STATE BS_AUTO3STATE).
:
CButton myBtn;
if (myBtn.GetCheck() = BST_CHECKED)
{
}