VpeGetControlAsInteger

<< Click to Display Table of Contents >>

Navigation:  Interactive Objects >

VpeGetControlAsInteger

Previous pageReturn to chapter overviewNext page

Returns the value of the specified control as integer.

int VpeGetControlAsInteger(

VpeHandle hControl,

int *value

)

VpeHandle hControl

Control Handle

int *value

pointer to a variable that receives the value of the Control as integer when the function returns

Returns:

Value

Description

True

value retrieved successfully

False

value could not be retrieved (for example if the control contained pure text that could not be converted to an integer value)

Remarks:

If the control was created from a template and it has an associated Field, you should not use this property. It is - from the programmer's view and source code logic - more efficient to use instead the field's methods and properties in order to access the control's value.

The corresponding property of the field is VpeGetFieldAsInteger.

Example:

int value;

hControl = VpeFormFieldControl(hDoc, 1, 1, -9, VFREE, "123");

VpeGetControlAsInteger(hControl, &x);

 

See Also:

"Interactive Documents" in the Programmer's Manual.