Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 30th, 2012  |  syntax: None  |  size: 0.41 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Owner-drawn button with BS_AUTORADIOBUTTON style
  2. void CPngButton::DrawItem( LPDRAWITEMSTRUCT lpDIS )
  3. {
  4.     ASSERT(lpDIS != NULL);
  5.  
  6.     UINT state = lpDIS->itemState;
  7.     if (state & ODS_CHECKED)
  8.     {
  9.     // do stuff
  10.     }
  11. }
  12.        
  13. if (BST_CHECKED == SendMessage(BM_GETCHECK))
  14.        
  15. if (Button_GetState(lpDIS->hwndItem) & BST_CHECKED)
  16.        
  17. CButton myBtn;
  18. if (myBtn.GetCheck() = BST_CHECKED)
  19. {
  20.     // Drawing code here...
  21. }