L_VecIsObjectSelected

#include "lvkrn.h"

L_BOOL EXT_FUNCTION 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.

This function is not supported in the OpenGL and DirectX engines.

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. */

void SelectObjectUnder( 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);
   }
}