CreatePenData
1.0 2.0
Creates an
empty HPENDATA block.
Note This function
is provided only for compatibility with version 1.0 of the Pen API and will not
be supported in future versions. Use CreatePenDataEx instead.
HPENDATA CreatePenData( LPPENINFO lppeninfo,
int cbOem, UINT uScale, UINT gmemFlags
)
Parameters
lppeninfo
Address of
tablet information to be inserted into the PENINFO
cbOem
Width of OEM
data packet. If this value is greater than or equal to 0, the OEM data
overrides the contents of the PENINFO structure, if present; otherwise,
a negative value such as -1 can be
used to specify that the system should calculate the size of the OEM data
packet.
uScale
Data-scaling
metric value. This parameter can be one of the following values:
Constant |
Description |
PDTS_LOMETRIC |
Each
logical unit is mapped to 0.1 millimeter. Positive x is to the right;
positive y is down. |
PDTS_HIMETRIC |
Each
logical unit is mapped to 0.01 millimeter. Positive x is to the right;
positive y is down. |
PDTS_HIENGLISH |
Each
logical unit is mapped to 0.001 inch. Positive x is to the right; positive y
is down. |
PDTS_ARBITRARY |
The
application has done its own scaling of the data point. |
PDTS_STANDARDSCALE |
The
standard scaling metric; equivalent to PDTS_HIENGLISH. |
gmemFlags
Flag that
specifies whether or not the Windows GlobalAlloc
Return Value
Returns a
handle to a new and empty pen data object if successful; otherwise, it returns
NULL.
Comments
The
application provides the PENINFO
The uScale
parameter specifies scaling values that are also used in the MetricScalePenData
If lppeninfo
is NULL, and if there is no tablet on the system (that is, if SendDriverMessage
fails), it returns NULL.
The cbOem
value must be less than or equal to 12, depending on the size of the OEM data
packet. A value of 0 explicitly sets the amount of OEM information to none. A
negative value indicates that the size of the OEM data packet is to be
calculated by the system. Any existing value for the cbOemData member of
PENINFO
See Also