HRGN PathToRegion(hdc) | |||
HDC hdc; |
The PathToRegion function creates a region from a path.
hdc
Identifies the device context of the path.
Returns the handle to the resulting region if the call succeeds, 0 otherwise.
The DC must have an inactive path bracket, started by calling BeginPath and ended by calling EndPath. PathToRegion discards the path.
The current SetPolyFillMode value is used to create the region.
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 |
SetPolyFillMode, BeginPath, EndPath