The PathToRegion function creates a region from the path that is selected into the specified device context. The resulting region uses device coordinates.
HRGN PathToRegion( HDC hdc );
Handle to a device context that contains a closed path.
If the function succeeds, the return value identifies a valid region.
If the function fails, the return value is zero.
When you no longer need the HRGN object call the DeleteObject function to delete it.
The device context identified by the hdc parameter must contain a closed path.
After PathToRegion converts a path into a region, the system discards the closed path from the specified device context.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||wingdi.h (include Windows.h)|