VpeGetFocusControl

<< Click to Display Table of Contents >>

Navigation:  Interactive Objects >

VpeGetFocusControl

Previous pageReturn to chapter overviewNext page

Returns the Control Handle of the control which currently has the focus.

VpeHandle VpeGetFocusControl(

VpeHandle hDoc,

)

VpeHandle hDoc

Document Handle

Returns:

Returns the Control Handle of the control which currently has the focus.

If no control owns the focus, NULL is returned.

Example:

// The following code retrieves the name of the focused control

// (assuming the control was created from a dycodoc template,

// otherwise controls don't have names assigned to them and NULL is

// returned).

// VpeGetObjName() accepts a Control Handle in place of an Object Handle:

 

LPSTR control_name[256];

VpeGetObjName(VpeGetFocusControl(hDoc), control_name, sizeof(control_name));

 

See Also:

"Interactive Documents" in the Programmer's Manual.