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

LVectorBase::GetGroupByName

Show in webframe

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetGroupByName(pszName, pVectorGroup)

const L_TCHAR * pszName;

/* group name */

LVectorGroup *pVectorGroup;

/* pointer to a vector group object */

Gets the group with the specified name, in the class object's associated vector handle.

Parameter

Description

pszName

Character string that contains the name of the group to get.

pVectorGroup

Pointer to an LVectorGroup object to be updated with the group handle, if the group is found. If the group is not found, this function will return ERROR_VECTOR_GROUP_NOT_FOUND.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

If two or more groups in a vector handle have the same name, this function will get the first group found.

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::GetGroupCount, LVectorBase::GetGroupByIndex, LVectorGroup::GetGroupDesc

Topics:

Working with Vector Groups

Example

This example will delete all clones of the named group from pVector.

L_INT LVectorBase__GetGroupByNameExample(HWND hWnd, LVectorBase *pVector)
{
   UNREFERENCED_PARAMETER(hWnd);
   LVectorGroup   VectorGroup;
   L_INT          nRet;
   L_TCHAR*       pszName = TEXT("TerryGroup1");
   // Get the group with the given name 
   nRet = pVector->GetGroupByName(pszName, &VectorGroup );
   if( nRet == SUCCESS )
   {
      // Delete its clones
      nRet = VectorGroup.DeleteGroupClones();
      if(nRet != SUCCESS)
         return nRet;
   }
   else
      return nRet;
   return SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.