L_VecAddGroup

#include "ltvkrn.h"

L_LVKRN_APIL_INTL_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

pVECTORHANDLEpVector

Pointer to the vector handle.

constpVECTORGROUPDESCpGroupDesc

Pointer to aVECTORGROUPDESCstructure that contains the new group settings.

pVECTORGROUPpGroup

Pointer to aVECTORGROUPstructure to be updated with the handle of the new group.

L_UINT32dwFlags

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 toReturn Codes.

Comments

For more information on the group settings, refer to theVECTORGROUPDESCstructure.

To change group settings, get the current group settings by callingL_VecGetGroup, set the new settings in the VECTORGROUPDESC structure pointed to by pGroupDesc and then set the new group settings by callingL_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 );returnnRet;}

LEADTOOLS Vector C API Help
188金宝搏的网址客服|Support|Contact Us|Intellectual Property Notices
© 1991-2021LEAD Technologies, Inc.All Rights Reserved.