- // In WIN16, draw a cross
- HPEN blackPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
- HPEN whiteBrush = (HPEN)GetStockObject(WHITE_BRUSH);
- HPEN hPenOld = (HPEN)::SelectObject(hdcMem, blackPen);
- HPEN hBrushOld = (HPEN)::SelectObject(hdcMem, whiteBrush);
- ::SetROP2(hdcMem, R2_COPYPEN);
- Rectangle(hdcMem, 0, 0, nCheckWidth, nCheckHeight);
- MoveTo(hdcMem, 0, 0);
- LineTo(hdcMem, nCheckWidth, nCheckHeight);
- MoveTo(hdcMem, nCheckWidth, 0);
- LineTo(hdcMem, 0, nCheckHeight);
- ::SelectObject(hdcMem, hPenOld);
- ::SelectObject(hdcMem, hBrushOld);
- ::DeleteObject(blackPen);