LVectorLayer::GetLayerDesc

#include "ltwrappr.h"

virtual L_INT LVectorLayer::GetLayerDesc(pLayerDesc=NULL)

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

Parameters

pVECTORLAYERDESC pLayerDesc

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

Returns

Value Meaning
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

See Also

Functions

Topics

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 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C++ Class Library Help