BOOL SelectClipPath(hdc, iMode) | |||
HDC hdc; | |||
int iMode; |
The SelectClipPath function selects the current path as a clip region for the specified DC.
hdc
Identifies the device context of the path.
iMode
Specifies the way to use the path. The following values are allowed:
Type | Meaning |
RGN_AND | ||
The new clip region includes the overlapping areas of the current clip region and the current path (intersection). | ||
RGN_COPY | ||
The new clip region is the current path. | ||
RGN_DIFF | ||
The new clip region includes the areas of the current clip region with those of the current path excluded. | ||
RGN_OR | ||
The new clip region includes the combined areas of the current clip region and the current path (union). | ||
RGN_XOR | ||
The new clip region includes the combined areas of the current clip region and the current path but without the overlapping areas. |
The return value is TRUE if the call succeeded, otherwise FALSE.
The DC must have an inactive path bracket, started by calling BeginPath and ended by calling EndPath. SelectClipPath discards the path.
Use the GetLastError function to retrieve the error value, which may be one of the following:
ERROR_INVALID_MODE | |
ERROR_INVALID_PARAMETER | |
ERROR_NOT_ENOUGH_MEMORY |
BeginPath EndPath