GetStrokeTableAttributes 

2.0     

Retrieves information about a stroke s class from the table in the PENDATAHEADER1AOCX0 of an HPENDATA object.

int GetStrokeTableAttributes( HPENDATA hpndt, UINT iTblEntry, LPVOID lpvBuffer, UINT uOption )

Parameters

hpndt

Handle to the HPENDATA object, which must not be compressed.

iTblEntry

Zero-based table index to the class entry in the pen data header.

lpvBuffer

Pointer to a structure whose type depends on uOption, or NULL if the uOption parameter does not require this buffer.

uOption

Specifies the attributes to retrieve. This parameter can be one of the following:

Constant

Description

GSA_PENTIPTABLE

Retrieve the pen-tip characteristics (color, width, nib) of the class of strokes specified by iTblEntry. lpvBuffer is a pointer to a PENTIP1AOCX_ structure. Return value is the number of strokes using this class.

GSA_SIZETABLE

Retrieve the number of entries in the stroke class table. iTblEntry and lpvBuffer are unused and ignored. Return value is the number of classes used in the stroke class table.

GSA_USERTABLE

Retrieve the user value, if any, of the class of strokes specified by iTblEntry. lpvBuffer is a pointer to a doubleword value, or NULL. The number of bytes that are valid in lpvBuffer depends on flags set in CreatePenDataEx1AOBT_. This number is returned by the function, and can be 0 (no user value), 1 (byte value),
2 (word value), or 4 (doubleword value). Return value
is 4, because the user value in the stroke class table
is a doubleword value.

 

Return Value

Returns an integer if successful, depending on the value of uOption, as described above. If an error occurs, returns one of the following:

Constant

Description

PDR_COMPRESSED

Pen data is compressed.

PDR_ERROR

Parameter or other unspecified error.

PDR_MEMERR

Memory error.

PDR_PNDTERR

Invalid pen data.

PDR_VERSIONERR

Could not convert old pen data.

 

See Also

CreatePenDataEx, GetStrokeAttributes, SetStrokeAttributes, SetStrokeTableAttributes, PENTIP