L_VecSelectObject

#include "lvkrn.h"

L_LVKRN_API L_INT L_VecSelectObject(pVector, pObject, bSelect)

const pVECTORHANDLE pVector;

/* pointer to a vector handle */

pVECTOROBJECT pObject;

/* pointer to a vector object */

L_BOOL bSelect;

/* flag that indicates whether to select or unselect */

Selects or unselects an object.

Parameter

Description

pVector

Pointer to a vector handle. Objects within this vector handle will be selected or unselected.

pObject

Pointer to a VECTOROBJECT structure that references an object to be selected or unselected.

bSelect

Flag that indicates whether to select or unselect the specified object. Possible values are:

 

Value

Meaning

 

TRUE

Select the specified object.

 

FALSE

Unselect the specified object.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Selects or unselects an object within the specified vector handle.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_VecIsObjectSelected, L_VecDeleteObject, L_VecHitTest, L_VecGetObject

Example

This example will select the object under a given 2D point.

L_INT VecSelectObjectExample(
   pVECTORHANDLE pVector,
   POINT* pPoint)
{
   VECTOROBJECT   Object;    /* Object under point */
   L_INT          nRet;
   /* Get object under that point */
   nRet = L_VecHitTest( pVector, pPoint, &Object );
   /* Is there an object under that point? */
   if( nRet == SUCCESS )
      /* Yes, select it */
      nRet = L_VecSelectObject( pVector, &Object, TRUE );
   return nRet;
}