Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function retrieves the foreground mix mode of the specified device context. The mix mode specifies how the pen or interior color and the color already on the screen are combined to yield a new color.
Syntax
int GetROP2( HDC hdc ); |
Parameters
- hdc
-
[in] Handle to the device context.
Return Value
If the function succeeds, the return value specifies the foreground mix mode.
If the function fails, the return value is zero.
To get extended error information, call GetLastError.
Remarks
The following table shows the foreground mix modes.
Mix mode | Description |
---|---|
R2_BLACK |
Pixel is always 0. |
R2_COPYPEN |
Pixel is the pen color. |
R2_MASKNOTPEN |
Pixel is a combination of the colors common to both the screen and the inverse of the pen. |
R2_MASKPEN |
Pixel is a combination of the colors common to both the pen and the screen. |
R2_MASKPENNOT |
Pixel is a combination of the colors common to both the pen and the inverse of the screen. |
R2_MERGENOTPEN |
Pixel is a combination of the screen color and the inverse of the pen color. |
R2_MERGEPEN |
Pixel is a combination of the pen color and the screen color. |
R2_MERGEPENNOT |
Pixel is a combination of the pen color and the inverse of the screen color. |
R2_NOP |
Pixel remains unchanged. |
R2_NOT |
Pixel is the inverse of the screen color. |
R2_NOTCOPYPEN |
Pixel is the inverse of the pen color. |
R2_NOTMASKPEN |
Pixel is the inverse of the R2_MASKPEN color. |
R2_NOTMERGEPEN |
Pixel is the inverse of the R2_MERGEPEN color. |
R2_NOTXORPEN |
Pixel is the inverse of the R2_XORPEN color. |
R2_WHITE |
Pixel is always 1. |
R2_XORPEN |
Pixel is a combination of the colors in the pen and in the screen, but not in both. |
Requirements
Header | windows.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 1.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |