|
CreatePenData
- 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 structure in the pen data header. If this parameter is NULL, the current
tablet settings are retrieved from the hardware instead. If there is no tablet, the
pen data will not have an embedded PENINFO section and the wPndts member in PENDATAHEADER will have the PDTS_NOPENINFO flag set.
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 function should create a shared memory object when the pen data object is
created. This should be either 0 or GMEM_DDESHARE. The GMEM_MOVEABLE and
GMEM_ZEROINIT flags are added to this value, and other GMEM_ flags are ignored.
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 structure for the header, the real size of any OEM data stored with each
coordinate, and the scale of the coordinates.
The uScale parameter specifies scaling values that are also used in the MetricScalePenData function and in the PENDATAHEADER structure member wPndts. The scaling values do not behave in the same way as the Windows scaling
units with similar names. For example, a 1-inch line in MM_HIENGLISH will not
necessarily be an inch long on the screen because GDI does not know the size of the
monitor. However, with PDTS_HIENGLISH in MetricScalePenData, a line drawn an inch long is actually an inch long.
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 can be overwritten.
See Also
CreatePenDataEx, DestroyPenData, PDTS_
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|