Available in LEADTOOLS Vector Imaging toolkits. |
L_VecAddGroup
#include "lvkrn.h"
L_LVKRN_API L_INT L_VecAddGroup(pVector, pGroupDesc, pGroup, dwFlags)
pVECTORHANDLE pVector; |
/* pointer to a vector handle */ |
const pVECTORGROUPDESC pGroupDesc; |
/* pointer to a structure */ |
pVECTORGROUP pGroup; |
/* pointer to a vector group */ |
L_UINT32 dwFlags; |
/* flags */ |
Adds a new empty group to a vector handle. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.
Parameter |
Description |
|
pVector |
Pointer to the vector handle. |
|
pGroupDesc |
Pointer to a VECTORGROUPDESC structure that contains the new group settings. |
|
pGroup |
Pointer to a VECTORGROUP structure to be updated with the handle of the new group. |
|
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
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
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_VecDeleteGroup, L_VecGetGroup, L_VecSetGroup, L_VecGetGroupByName, L_VecGetGroupByIndex, L_VecCopyGroup, L_VecEmptyGroup, L_VecEmptyGroup, L_VecFreeGroup, L_VecDeleteGroupClones |
Topics: |
Example
This example will add a new group to a vector handle.
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; }