LVectorBase::EnumVertices

#include "ltwrappr.h"

virtual L_INT LVectorBase::EnumVertices(L_UINT32 dwFlags=0)

L_UINT32 dwFlags;

/* flags that determine which object's flags to enumerate */

Enumerates all vertices within the vector handle.

Parameter

Description

dwFlags

Flags that determine which object's vertices to enumerate. Possible values are:

 

Value

Meaning

 

0

Enumerate the vertices of all objects.

 

VECTOR_FLAGS_SELECTED_ONLY

Enumerate the vertices of selected objects only.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function will enumerate all the vertices in the given vector.

Note: In DirectX, you cannot enumerate vertices, therefore this function will do nothing.

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::EnumObjects

Topics:

Manipulating Objects or Vertices within a Vector Image

 

Vector Images: Obtaining Object Information

Example

class LMyVectorBase2: public LVectorBase
{
public:
   L_INT          m_nObjectCount ;

public:
   LMyVectorBase2();
   virtual ~LMyVectorBase2() ;
   virtual L_INT EnumVerticesCallBack(pVECTORHANDLE pVector, pVECTORPOINT pPoint);
};

LMyVectorBase2::LMyVectorBase2()
{
   m_nObjectCount = 0 ;
}

LMyVectorBase2::~LMyVectorBase2()
{
}


L_INT LMyVectorBase2::EnumVerticesCallBack(pVECTORHANDLE pVector, pVECTORPOINT pPoint)
{
   m_nObjectCount++ ;
   return SUCCESS ;
}

L_VOID Example17(HWND hWnd)
{
   L_TCHAR szTemp[100];
   LMyVectorBase2 Vector;
   Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));

   //Get the total number of vertices
   Vector.m_nObjectCount=0;
   Vector.EnableCallBack (TRUE);
   Vector.EnumVertices();
   wsprintf(szTemp, TEXT("Total Vertices in Vector: %d\n"), Vector.m_nObjectCount);
   MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
}