- 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
- );
+ wxDCTemp dcMem(hdcMem);
+ wxRendererNative::Get().DrawCheckBox(
+ m_pParent, dcMem, wxRect(0, 0, nBmpWidth, nBmpHeight), flags);
+ } // select hBmpCheck out of hdcMem