- // for not checkable bitmaps we should always use unchecked one because
- // their checked bitmap is not set
- bmp = GetBitmap(!IsCheckable() || (st & wxODChecked));
+ if ( st & wxODChecked )
+ {
+ // what goes on: DrawFrameControl creates a b/w mask,
+ // then we copy it to screen to have right colors
+
+ // first create a monochrome bitmap in a memory DC
+ HDC hdcMem = CreateCompatibleDC(hdc);
+ HBITMAP hbmpCheck = CreateBitmap(margin, m_nHeight, 1, 1, 0);
+ SelectObject(hdcMem, hbmpCheck);
+
+ // then draw a check mark into it
+ RECT rect = { 0, 0, margin, m_nHeight };
+ if ( m_nHeight > 0 )
+ {
+ ::DrawFrameControl(hdcMem, &rect, DFC_MENU, DFCS_MENUCHECK);
+ }
+
+ // finally copy it to screen DC and clean up
+ BitBlt(hdc, rc.x, rc.y, margin, m_nHeight, hdcMem, 0, 0, SRCCOPY);
+
+ DeleteDC(hdcMem);
+ DeleteObject(hbmpCheck);
+ }