L_VecGetActiveLayer

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecGetActiveLayer(pVector, pLayer)

Gets the active layer inside the specified vector handle.

Parameters

const pVECTORHANDLE pVector

Pointer to the source vector handle.

pVECTORLAYER pLayer

Pointer to a VECTORLAYER structure to be updated with the active layer.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Some functions will use the active layer when NULL is passed for a pVECTORLAYER parameter. This makes it easier to work with the toolkit when layers are not needed.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example will show the name of the current active layer inside the vector handle.

L_LTVKRNTEX_API L_INT VecGetActiveLayerExample(pVECTORHANDLE pVector) 
{ 
   VECTORLAYER       Layer; 
   VECTORLAYERDESC   LayerDesc; 
   L_INT             nRet; 
 
   /* Get the active layer layer */ 
   nRet = L_VecGetActiveLayer( pVector, &Layer ); 
   if( nRet == SUCCESS ) 
   { 
      /* Get its name */ 
      nRet = L_VecGetLayer( pVector, &Layer, &LayerDesc ); 
      if(nRet != SUCCESS) 
         return nRet; 
 
      MessageBox( NULL, LayerDesc.szName, TEXT("Active Layer"), MB_OK ); 
      nRet = L_VecFreeLayer( &LayerDesc ); 
   } 
   else 
      MessageBox( NULL, TEXT("Not found!!"), TEXT("Active Layer"), MB_OK ); 
 
   return nRet; 
} 

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.