Creates a region from the path that is selected into the specified device context. The resulting region uses device coordinates.
Creating a clipping region from the path selected into the device context of a form
HRGN PathToRegion(
HDC hdc // handle to DC
);
DECLARE INTEGER PathToRegion IN gdi32;
INTEGER hdc
hdc [in] 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.