Article ID: 111580
Article Last Modified on 10/29/2003
int PASCAL TestProc( HWND hWnd )
{
HDC hDC;
HBRUSH hGrayBrush, hOldBrush;
POINT aPoints[3];
hGrayBrush = CreateSolidBrush(RGB(128,128,128));
aPoints[0].x = 50;
aPoints[0].y = 10;
aPoints[1].x = 250;
aPoints[1].y = 50;
aPoints[2].x = 125;
aPoints[2].y = 130;
hDC = GetDC(hWnd);
// default pen, brush, and ROP2
Polygon(hDC, aPoints, sizeof(aPoints) / sizeof(POINT));
// default pen, gray brush, XORPEN ROP2
hOldBrush = SelectObject(hDC, hGrayBrush);
SetROP2(hDC, R2_XORPEN);
Polygon(hDC, aPoints, sizeof(aPoints) / sizeof(POINT));
// clean up
SelectObject(hDC, hOldBrush);
ReleaseDC(hWnd, hDC);
return 1;
}
Additional query words: buglist3.00 buglist3.10 3.00 3.10 ropcode code uneven
Keywords: KB111580