L_VecSetGroup

#include "lvkrn.h"

L_INT EXT_FUNCTION L_VecSetGroup(pVector, pGroup, pGroupDesc)

pVECTORHANDLE pVector;

/* pointer to a vector handle */

const pVECTORGROUP pGroup;

/* pointer to a vector group */

const pVECTORGROUPDESC pGroupDesc;

/* pointer to a structure */

Updates a vector group with new information. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter

Description

pVector

Pointer to the vector handle.

pGroup

Pointer to a VECTORGROUP structure that references the vector group to set.

pGroupDesc

Pointer to a VECTORGROUPDESC structure that contains the new group information to set.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

For more information on the group information that can be set, refer to the VECTORGROUPDESC structure.

To get the group information for a specific group, use the L_VecGetGroup function.

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:

L_VecGetGroup, L_VecFreeGroup

Topics:

Working with Vector Groups

Example

/* This example will change the name of a given group */
void LockGroup( pVECTORHANDLE pVector, const L_TCHAR *pszOldName, const L_TCHAR *pszNewName )
{
   VECTORGROUP       Group;
   VECTORGROUPDESC   GroupDesc;
   L_INT             nRet;

   /* find the group with that name */
   nRet = L_VecGetGroupByName( pVector, pszOldName, &Group );
   if( nRet != SUCCESS )
      return;  /* group not found */

   /* get this group for editing */
   L_VecGetGroup( pVector, &Group, &GroupDesc );

   /* set new name */
   lstrcpy( GroupDesc.szName, pszNewName ); 

   /* set back and clean up */
   L_VecSetGroup( pVector, &Group, &GroupDesc );
   L_VecFreeGroup( &GroupDesc );
}