How do I get the checked/unchecked state of BS_AUTORADIOBUTTON? My code currently doesn't work.
void CPngButton::DrawItem( LPDRAWITEMSTRUCT lpDIS )
{
ASSERT(lpDIS != NULL);
UINT state = lpDIS->itemState;
if (state & ODS_CHECKED)
{
// do stuff
}
}
I've also tried
if (BST_CHECKED == SendMessage(BM_GETCHECK))
but this doesn't work either.
ODS_CHECKED only applies to menus. BM_GETCHECK and BM_GETSTATE can both provide the checked state: