Draw.SetROP2



SetROP2(hdc As OLE_HANDLE,nDrawMode As Long) As Long

Parameters

hdc As OLE_HANDLE
The hDC property is a handle (a number) that the Windows operating system uses for internal reference to an object. You can paint in theinternal area of any control that has an hDC property.
nDrawMode As Long
Specifies the mix mode. This parameter can be one of the following values.
Value
Name
Description
1
R2_BLACK Pixel is always 0.
13
R2_COPYPEN Pixel is the pen color.
3
R2_MASKNOTPEN Pixel is a combination of the colors common to both the screen and the inverse of the pen.
9
R2_MASKPEN Pixel is a combination of the colors common to both the pen and the screen.
5
R2_MASKPENNOT Pixel is a combination of the colors common to both the pen and the inverse of the screen.
12
R2_MERGENOTPEN Pixel is a combination of the screen color and the inverse of the pen color.
15
R2_MERGEPEN Pixel is a combination of the pen color and the screen color.
14
R2_MERGEPENNOT Pixel is a combination of the pen color and the inverse of the screen color.
11
R2_NOP Pixel remains unchanged.
6
R2_NOT Pixel is the inverse of the screen color.
4
R2_NOTCOPYPEN Pixel is the inverse of the pen color.
8
R2_NOTMASKPEN Pixel is the inverse of the R2_MASKPEN color.
2
R2_NOTMERGEPEN Pixel is the inverse of the R2_MERGEPEN color.
10
R2_NOTXORPEN Pixel is the inverse of the R2_XORPEN color.
16
R2_WHITE Pixel is always 1.
7
R2_XORPEN Pixel is a combination of the colors in the pen and in the screen, but not in both.
ED
not used
RT
avaliable

Remarks

The SetROP2 function sets the current foreground mix mode. GDI uses the foreground mix mode to combine pens and interiors of filled objects with the colors already on the screen. The foreground mix mode defines how colors from the brush or pen and the colors in the existing image are to be combined.

See Also

Draw