#include "lvkrn.h"
L_LVKRN_API L_INT L_VecGetHyperlink(pVector, pObject, uIndex, pTarget)
Gets information about one of the targets in the target list of a hyperlinked vector object.
Pointer to the vector handle.
Pointer to a VECTOROBJECT structure that contains the hyperlinked vector object for which to get the hyperlink target.
Index in the target list.
Pointer to a VECTORLINKDESC structure to be updated with the hyperlink target information.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function returns an error if the object was not a hyperlinked vector object.
Required DLLs and Libraries
L_INT VecGetHyperlinkExample(
pVECTORHANDLE pVector,
pVECTOROBJECT pVecObj)
{
L_INT nRet;
L_UINT i;
L_UINT uCount;
VECTORLINKDESC Link;
nRet = SUCCESS;
uCount = L_VecGetHyperlinkCount( pVector, pVecObj );
for( i = 0 ; i < uCount && SUCCESS == nRet ; i++ )
{
nRet = L_VecGetHyperlink ( pVector, pVecObj, i, &Link );
if( SUCCESS == nRet && TRUE == Link.bObject && VECTOR_RECTANGLE == Link.tar.vectorobject.target.nType )
{
Link.bObject = FALSE;
lstrcpy( Link.tar.fileobject.target.szPath, MAKE_IMAGE_PATH(TEXT("cannon.jpg")));
Link.tar.fileobject.hwndParent = NULL;
nRet = L_VecSetHyperlink ( pVector, pVecObj, i, &Link );
}
}
return nRet;
}