- if ( IsChecked() )
- {
- // first create a monochrome bitmap in a memory DC
- MemoryHDC hdcMem(hdc);
- MonoBitmap hbmpCheck(nCheckWidth, nCheckHeight);
- SelectInHDC selBmp(hdcMem, hbmpCheck);
-
- // then draw a check mark into it
- RECT rect = { 0, 0, nCheckWidth, nCheckHeight };
- ::DrawFrameControl(hdcMem, &rect,
-#ifdef __WXWINCE__
- DFC_BUTTON, DFCS_BUTTONCHECK
-#else
- DFC_MENU, DFCS_MENUCHECK
-#endif
- );
-
- // finally copy it to screen DC
- ::BitBlt(hdc, x, y, nCheckWidth, nCheckHeight, hdcMem, 0, 0, SRCCOPY);
- }