Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS Vector C++ Class Library Help

LVectorLayer::GetLayerDesc

Show in webframe

#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;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.