LVectorGroup::EnumObjects

#include "ltwrappr.h"

virtual L_INT LVectorGroup::EnumObjects (dwFlags)

L_UINT32 dwFlags;

flags

Enumerates all objects inside the vector group object.

Parameter Description
dwFlags Flag that indicates which objects to enumerate. Possible values are:
  Value Meaning
  0 Enumerate all objects in the group.
  VECTOR_FLAGS_SELECTED_ONLY Enumerate only selected objects in the group.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

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:

LVectorGroup::EnumObjectsCallBack, LVectorBase::EnumVertices

Topics:

Working with Vector Groups

Example

This example displays the total number of objects in each group in a vector.

class LMyVectorGroup1: public LVectorGroup 
{ 
public: 
   L_INT          m_nObjectCount ; 
public: 
   LMyVectorGroup1() {m_nObjectCount=0;}; 
   virtual ~LMyVectorGroup1(){}; 
   virtual L_INT  EnumObjectsCallBack( pVECTORHANDLE pVector, pVECTOROBJECT pObject); 
}; 
L_INT LMyVectorGroup1::EnumObjectsCallBack( pVECTORHANDLE pVector, pVECTOROBJECT pObject) 
{ 
   UNREFERENCED_PARAMETER(pVector); 
   UNREFERENCED_PARAMETER(pObject); 
   m_nObjectCount++; 
   return SUCCESS; 
} 
L_INT LVectorGroup__EnumObjectsExample(HWND hWnd, LVectorBase *pVector) 
{ 
   L_INT nRet; 
   L_INT i; 
   for (i=0; i<pVector->GetGroupCount(); i++) 
   { 
      LMyVectorGroup1 VectorGroup; 
      L_TCHAR        szMsg[200]; 
      nRet = pVector->GetGroupByIndex(i, &VectorGroup); 
      if(nRet != SUCCESS) 
         return nRet; 
      VectorGroup.m_nObjectCount = 0; 
      VectorGroup.EnableCallBack(TRUE); 
      VectorGroup.EnumObjects(); 
      wsprintf(szMsg, TEXT("Group[%d]: Total Objects[%d]"), i, VectorGroup.m_nObjectCount); 
      MessageBox(hWnd, szMsg, TEXT(""), MB_OK); 
   } 
   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