L_VecSetLocked

#include "lvkrn.h"

L_LVKRN_API L_INT L_VecSetLocked(pVector, bLock)

pVECTORHANDLE pVector;

/* pointer to a vector handle */

L_BOOL bLock;

/* flag */

Locks or unlocks the specified vector handle. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter

Description

pVector

Pointer to a vector handle.

bLock

Flag that indicates whether to lock or unlock the specified vector handle. Possible values are:

 

Value

Meaning

 

TRUE

Lock the specified vector handle.

 

FALSE

Unlock the specified vector handle.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Locking a vector handle has precedence over locking layers within the vector handle. Therefore, if a vector handle is locked, the layers within that vector handle cannot be edited, even if the layers are not locked.

To lock a layer, set the bLocked member of a VECTORLAYERDESC structure to TRUE and update the layer information using the L_VecSetLayer function.

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_VecIsLocked, L_VecSetLayer

Topics:

Working with Vector Handles

Example

This example will toggle the lock property of a vector handle.

L_INT VecSetLockedExample(pVECTORHANDLE pVector)
{
   if( L_VecIsLocked( pVector ) )
      L_VecSetLocked( pVector, FALSE );
   else
      L_VecSetLocked( pVector, TRUE );
   return SUCCESS;
}