L_VecGetActiveLayer

#include "lvkrn.h"

L_INT EXT_FUNCTION L_VecGetActiveLayer(pVector, pLayer)

const pVECTORHANDLE pVector;

/* pointer to vector handle */

pVECTORLAYER pLayer;

/* pointer to vector layer */

Gets the active layer inside the specified vector handle.

Parameter

Description

pVector

Pointer to the source vector handle.

pLayer

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

Returns

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

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_VecSetActiveLayer.

Topics:

Working with Vector Layers

Example

/* This example will show the name of the current active layer inside the vector handle */
L_VOID ShowActiveLayer( 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 */
      L_VecGetLayer( pVector, &Layer, &LayerDesc );
      MessageBox( NULL, LayerDesc.szName, TEXT("Active Layer"), MB_OK );
      L_VecFreeLayer( &LayerDesc );
   }
   else
      MessageBox( NULL, TEXT("Not found!!"), TEXT("Active Layer"), MB_OK );
}