#include "ltwrappr.h"
virtual L_INT LVectorBase::AddGroup(pVectorGroup, dwFlags = VECTOR_FLAGS_RENAME_DUPLICATES)
Adds a new empty group to a vector handle.
This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.
Pointer to the vector group object that specifies the group settings.
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. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
To add a new vector group, do the following:
Declare an LVectorGroupobject.
Call LVectorGroup::GetGroupDesc to retrieve the current group settings.
Change the group settings.
Call LVectorGroup::SetGroupDesc to set the changed group settings.
Pass the address of the LVectorGroup object to LVectorBase::AddGroup.
Required DLLs and Libraries
This example will add a new group to a vector handle.
L_INT LVectorBase__AddGroupExample(HWND hWnd, LVectorBase *pVector)
{
UNREFERENCED_PARAMETER(hWnd);
L_INT nRet;
LVectorGroup VectorGroup;
VECTORGROUPDESC GroupDesc;
nRet = VectorGroup.GetGroupDesc(&GroupDesc);
if(nRet != SUCCESS)
return nRet;
lstrcpy(GroupDesc.szName, TEXT("My New Group"));
nRet = VectorGroup.SetGroupDesc(&GroupDesc);
if(nRet != SUCCESS)
return nRet;
nRet = pVector->AddGroup(&VectorGroup, VECTOR_FLAGS_RENAME_DUPLICATES);
if(nRet != SUCCESS)
{
MessageBox( NULL, TEXT("Could not add group!"), TEXT(""), MB_OK );
return nRet;
}
//...LVectorGroup destructor called when VectorGroup goes out of scope
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.