Index   Commented   Search   About

AddPointsPenData

  1. 0 2.0

Adds a set of data points to the pen data object.

HPENDATA AddPointsPenData( HPENDATA hpendata, LPPOINT lppt, LPVOID lpvOem, LPSTROKEINFO lpsiNew )

Parameters

hpendata

Handle to a pen data object.

lppt

Address of an array of POINT structures containing new data points to be added to the pen data. Zero points can be added to force a change of pen state or to set a new pen state.

lpvOem

OEM data. Can be set to NULL if there is no additional OEM data. The pen data header determines how the OEM data is interpreted.

lpsiNew

Address of a STROKEINFO structure for new stroke data. Contains the count of points from lppt to be added.

Return Value

Returns a handle to the pen data object. Normally, this is the same handle originally passed to the function. NULL is returned on error. The size of hpendata is limited to 64K.

Comments

A call to GetPenHwEventData or GetPenInput gets the lpsiNew and lpvOem values. A subsequent call to AddPointsPenData appends the set of points to the HPENDATA memory block identified by hpendata. The lpsiNew argument points to a STROKEINFO structure that describes the new points, and lpvOem points to the corresponding OEM data (if any) to be added along with the points.

The STROKEINFO structure indicates the pen state of the new pointspics/PENAPI00090001.gifthat is, whether the pen is up or down. To avoid unnecessarily creating new strokes in the HPENDATA block, AddPointsPenData compares the pen state of the new points with the pen state of the last stroke in the HPENDATA block. If the new points have the same pen state as the last stroke, the function appends the points to the last stroke and updates the last STROKEINFO structure within the HPENDATA block. If the new points have a different pen state, AddPointsPenData appends them to the HPENDATA block as a new stroke, along with the STROKEINFO structure pointed to by lpsiNew.

AddPointsPenData does not scale the data points. The calling application must ensure that the added data points have the same scale as the rest of the HPENDATA block.

See Also

CreatePenData
, GetPenHwEventData

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder

More Online Helps

Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun