- // then draw a check mark into it
-
- RECT rect;
- rect.left = 0;
- rect.top = 0;
- rect.right = nCheckWidth;
- rect.bottom = nCheckHeight;
-
-#ifdef __WXWINCE__
- DrawFrameControl(hdcMem, &rect, DFC_BUTTON, DFCS_BUTTONCHECK);
-#else
- DrawFrameControl(hdcMem, &rect, DFC_MENU, DFCS_MENUCHECK);
-#endif
-
- // finally copy it to screen DC and clean up
- BitBlt(hdc, x, y, nCheckWidth - 1, nCheckHeight,
- hdcMem, 0, 0, SRCCOPY);
-
- SelectObject(hdcMem, hbmpOld);
- DeleteObject(hbmpCheck);
- DeleteDC(hdcMem);
- }
+ // then draw a check mark into it
+ {
+ SelectInHDC selBmp(hdcMem, hBmpCheck);