- Owner-drawn button with BS_AUTORADIOBUTTON style
- void CPngButton::DrawItem( LPDRAWITEMSTRUCT lpDIS )
- {
- ASSERT(lpDIS != NULL);
- UINT state = lpDIS->itemState;
- if (state & ODS_CHECKED)
- {
- // do stuff
- }
- }
- if (BST_CHECKED == SendMessage(BM_GETCHECK))
- if (Button_GetState(lpDIS->hwndItem) & BST_CHECKED)
- CButton myBtn;
- if (myBtn.GetCheck() = BST_CHECKED)
- {
- // Drawing code here...
- }