DynaPDF Manual - Page 390

Previous Page 389   Index   Next Page 391

Function Reference
Page 390 of 818
GetFieldExpValCount
Syntax:
SI32 pdfGetFieldExpValCount(
const PPDF* IPDF, // Instance pointer
UI32 AField)
// Field handle
The function returns the number of values/export values which are defined for a field. Supported
field types are combo boxes, list boxes, radio buttons, and check boxes. If the field is a radio button,
the function returns the number of check boxes which are connected with the radio button. This
number can be used to access the check boxes of the radio button either with GetFieldExpValueEx()
or SetFieldExpValue(). If the field is a check box, the return value is always 1 because check boxes
do not support multiple export values. However, this function is normally used to determine the
number of available choice values within a combo box or list box because only these field types
support multiple choice values. See also GetFieldExpValueEx().
Return values:
If the function succeeds the return value is the number of values/export values which are defined for
a field. If the function fails the return value is a negative error code.
GetFieldExpValue
Syntax:
SI32 pdfGetFieldExpValue(
const PPDF* IPDF,
// Instance pointer
UI32 AField,
// Field handle
char* ADDR Value)
// Field's export value
This function retrieves the export value(s) of a check box, list box, or combo box. The parameter
AField must be a valid field handle of a check box, list box or combo box. The parameter Value holds
a pointer to the original export value. The retrieved string value must not be changed or freed in
your application.
The export value of a check box can be either "Off" if the check box is not selected or an arbitrary
string when the check box is selected.
The export value of a combo box or list box can be NULL when no value is selected.
Since Acrobat 5, list boxes support multiple selected values. In this case the export values are
delimited by a null-character (0); the last value is terminated with two null-characters. Note that the
returned string length is the length without the last two null-terminators.
The export values of a list box that has three selected values are returned as follows:
"Value1\0Value2\0Value3\0\0"
The returned string length would be 20 characters in this example.
To extract the values proceed as follows:
 

Previous topic: Optional Content, GetFieldEx2

Next topic: GetFieldExpValueEx


Start Chat