LVectorGroup::EnumObjects

Summary

Enumerates all objects inside the vector group object.

Syntax

#include "ltwrappr.h"

virtual L_INT LVectorGroup::EnumObjects (dwFlags)

Parameters

L_UINT32 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

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Required DLLs and Libraries

See Also

Functions

Topics

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

LEADTOOLS Vector C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.