L_VecAddGroup

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecAddGroup(pVector, pGroupDesc, pGroup, dwFlags)

Adds a new empty group to a vector handle. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameters

pVECTORHANDLE pVector

Pointer to the vector handle.

const pVECTORGROUPDESC pGroupDesc

Pointer to a VECTORGROUPDESC structure that contains the new group settings.

pVECTORGROUP pGroup

Pointer to a VECTORGROUP structure to be updated with the handle of the new group.

L_UINT32 dwFlags

Flag that indicates whether or not to rename duplicate group names. Possible values are:

Value Meaning
0 Don't rename duplicate group names, if found.
VECTOR_FLAGS_RENAME_DUPLICATES Renames duplicate group names if found. The toolkit will add a suffix (0, 1, 2, etc) to the group name if duplicated. Checking will be aborted when the suffix value reaches 999 and no unique name can be created.

Returns

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

Comments

For more information on the group settings, refer to the VECTORGROUPDESC structure.

To change group settings, get the current group settings by calling L_VecGetGroup, set the new settings in the VECTORGROUPDESC structure pointed to by pGroupDesc and then set the new group settings by calling L_VecSetGroup.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example will add a new group to a vector handle.

L_LTVKRNTEX_API L_INT VecAddGroupExample(pVECTORHANDLE * ppVector) 
{ 
   L_INT nRet; 
   VECTORGROUPDESC   GroupDesc; 
   VECTORGROUP       Group; 
 
   GroupDesc.nSize = sizeof( VECTORGROUPDESC ); 
   lstrcpy( GroupDesc.szName, TEXT("My Group")); 
   GroupDesc.dwTag = 0L; 
 
   nRet = L_VecAddGroup( *ppVector, &GroupDesc, &Group, VECTOR_FLAGS_RENAME_DUPLICATES ); 
   if(nRet != SUCCESS) 
      MessageBox( NULL, TEXT("Could not add group!"), NULL, MB_OK ); 
 
   return nRet; 
} 

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.