CreatePenDataRegion
2.0
Creates a
region that envelops the point data in an HPENDATA object.
HRGN CreatePenDataRegion( HPENDATA hpndt,
UINT uType )
Parameters
hpndt
Handle to the
HPENDATA object.
uType
Type of
region to create. This can be one of the following values:
CPDR_BOX
The bounding
box of the pen data ink is converted to a region.
CPDR_LASSO
The pen data
describes a lasso that makes up the boundary of the region. If the last point
of the pen data does not coincide with the first point, a closed figure is
created either by joining the endpoints with a straight line or by using the
intersection point of the beginning and ending line segments, whichever is more
appropriate. Only the first stroke is used; if the pen data has more than a
single stroke, subsequent strokes are ignored.
Return Value
This function
returns a handle to a region if successful; otherwise the return value is NULL.
Comments
The
coordinates of the region are the same as those used in the pen data. It is the
application s responsibility to remove the region when the application is
finished with it, using the Windows DeleteObject
CreatePenDataRegion enables an application to determine the screen area a
gesture such as lasso or cut applies to. For an example of how to use the CreatePenDataRegion
function to determine the area of a gesture, see the section DoDefaultPenInput
Messages in Chapter 2, Starting Out with System Defaults.