Returns a value that indicates whether or not the specified object is selected.
#include "ltvkrn.h"
L_LVKRN_API L_BOOL L_VecIsObjectSelected(pVector, pObject)
Pointer to a vector handle.
Pointer to a vector object.
Value | Meaning |
---|---|
TRUE | The specified object is selected. |
FALSE | The specified object is not selected. |
If pObject is NULL and any object inside the vector handle is currently selected, this function will return TRUE.
This example will determine whether or not the object under the given point is selected.
L_LTVKRNTEX_API 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;
}