LVectorLayer::GetLayerDesc

#include "ltwrappr.h"

virtual L_INT LVectorLayer::GetLayerDesc(pLayerDesc=NULL)

pVECTORLAYERDESC pLayerDesc;

pointer to a structure

Gets layer information on the class object's associated layer.

Parameter

Description

pLayerDesc

Pointer to a VECTORLAYERDESC structure to be updated with the layer information if the layer is found.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function updates the m_Desc member variable of the LVectorLayer object.

This function can be used in conjunction with LVectorLayer::SetLayerDesc to change layer properties.

LVectorLayer::GetLayerDesc and LVectorLayer::SetLayerDesc should be called in pairs.

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:

LVectorBase::AddLayer, LVectorBase::GetLayerByIndex, LVectorBase::GetLayerByName, LVectorBase::GetLayerCount

Topics:

Working with Vector Layers

Example

This example will add a new layer to a vector handle.

L_INT LVectorLayer__GetLayerDescExample(HWND hWnd, LVectorBase *pVector) 
{ 
   UNREFERENCED_PARAMETER(hWnd); 
   L_INT             nRet; 
   LVectorLayer      VectorLayer; 
   VECTORLAYERDESC   LayerDesc; 
   nRet = VectorLayer.GetLayerDesc(&LayerDesc); 
   if(nRet != SUCCESS) 
      return nRet; 
   lstrcpy(LayerDesc.szName, TEXT("Terry's New Layer")); 
   VectorLayer.SetLayerDesc(&LayerDesc); 
   nRet = pVector->AddLayer(&VectorLayer, VECTOR_FLAGS_RENAME_DUPLICATES); 
   if(nRet != SUCCESS) 
   { 
      MessageBox( NULL, TEXT("Could not add layer!"), TEXT(""), MB_OK ); 
      return nRet; 
   } 
   //...LVectorLayer destructor called when VectorLayer goes out of scope 
   return SUCCESS; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Vector C++ Class Library Help