#include "ltwrappr.h"
L_INT LImageListControl::Remove(nIndex)
L_INT nIndex; |
index of the item to remove |
Removes the specified item from the ImageList Control.
Parameter |
Description |
nIndex |
0-based index that indicates which item to remove. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
This function will remove the specified item from the list.
Note: On an insert, the image and text (if any) are copied to internal storage. The ImageList Control will free its copy of the image and/or text when the item is deleted. You are responsible for freeing the original data when it is no longer needed by your application.
Required DLLs and Libraries
LTDIS For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
|
Topics: |
#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName
L_INT LImageListControl__RemoveExample(HWND hParent)
{
L_INT nRet;
LImageListControl m_ImgList;
LILITEM Item;
LBitmapBase Bitmap;
if(m_ImgList.CreateControl(hParent,0) == NULL)
return FAILURE;
nRet = Bitmap.Load(MAKE_IMAGE_PATH(TEXT("IMAGE1.CMP")));
if(nRet != SUCCESS)
return nRet;
Item.uStructSize = sizeof(LILITEM);
Item.pBitmap = Bitmap.GetHandle();
Item.pText = MAKE_IMAGE_PATH(TEXT("IMAGE1.CMP"));
Item.lData = 0;
Item.bSelected = TRUE;
Item.uMask = LILITEM_BITMAP | LILITEM_TEXT | LILITEM_DATA | LILITEM_SELECTED;
nRet = m_ImgList.Insert(&Item);// at end of list
if(nRet != SUCCESS)
return nRet;
// remove the first item from the control
nRet = m_ImgList.Remove(0);
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET