L_VecIsObjectSelected

#include "lvkrn.h"

L_LVKRN_API L_BOOL L_VecIsObjectSelected(pVector, pObject)

const pVECTORHANDLE pVector;

/* pointer to a vector handle */

const pVECTOROBJECT pObject;

/* pointer to a vector object */

Returns a value that indicates whether or not the specified object is selected.

Parameter

Description

pVector

Pointer to a vector handle.

pObject

Pointer to a vector object.

Returns

TRUE

The specified object is selected.

FALSE

The specified object is not selected.

Comments

If pObject is NULL and any object inside the vector handle is currently selected, this function will return TRUE.

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_VecGetObject, L_VecSetObject, L_VecSelectObject, L_VecDeleteObject, L_VecHitTest

Example

This example will determine whether or not the object under the given point is selected.

L_INT VecIsObjectSelectedExample(
   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 )
   {
      /* Show the selection state of the object */
      if( L_VecIsObjectSelected( pVector, &Object ) )
         MessageBox(NULL, TEXT("Object is selected."), TEXT("Test"), MB_OK);
      else
         MessageBox(NULL, TEXT("Object is not selected."), TEXT("Test"), MB_OK);
   }
   return nRet;
}