// get the color of the pixel
COLORREF pixelcolor = ::GetPixel(GetHdc(), XLOG2DEV(x), YLOG2DEV(y));
+ // JACS: what was this for?
+#if 0
// get the color of the pen
COLORREF pencolor = 0x00ffffff;
if (m_pen.Ok())
{
pencolor = m_pen.GetColour().GetPixel();
}
+#endif
// return the color of the pixel
if( col )
// check, if color of the pixels is the same as the color of the current
// pen and return TRUE if it is, FALSE otherwise
- return pixelcolor == pencolor;
+ // JACS, 24/02/2000: can't understand the reason for this, so returning TRUE instead.
+ // return pixelcolor == pencolor;
+
+ return TRUE;
}
void wxDC::DoCrossHair(wxCoord x, wxCoord y)
// 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);
+ HPEN hPenOld = (HPEN)::SelectObject(GetHdc(), blackPen);
+ HPEN hBrushOld = (HPEN)::SelectObject(GetHdc(), whiteBrush);
::SetROP2(GetHdc(), R2_COPYPEN);
Rectangle(GetHdc(), x1, y1, x2, y2);
MoveTo(GetHdc(), x1, y1);
if ((m_logicalFunction == wxCOPY) && (m_pen.GetStyle() == wxTRANSPARENT))
{
- RECT rect;
+ RECT rect;
rect.left = XLOG2DEV(x);
rect.top = YLOG2DEV(y);
rect.right = XLOG2DEV(x2);
- rect.bottom = YLOG2DEV(y2);
- (void)FillRect(GetHdc(), &rect, m_brush.GetResourceHandle() );
+ rect.bottom = YLOG2DEV(y2);
+ (void)FillRect(GetHdc(), &rect, (HBRUSH)m_brush.GetResourceHandle() );
}
else
{