#include "ltwrappr.h"
virtual L_INT LBitmapList::RemoveItem(uIndex, pRemovedBitmap)
L_UINT uIndex; |
position of the bitmap in the list |
LBitmapBase * pRemovedBitmap; |
pointer to an LBitmapBase object |
Removes a bitmap from the list.
Parameter |
Description |
uIndex |
Position of the bitmap in the list. Use zero-based indexing. For example, if there are 10 bitmaps in a list, the index of the last one is 9. When you remove a bitmap from a list, the indexes of other bitmaps change to accommodate the removal. |
pRemovedBitmap |
Pointer to the bitmap object that references the removed bitmap. You can use this object afterward to work with the individual bitmap. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
This function does not free the bitmap. If you want to remove a bitmap from a bitmap list and free the bitmap, you should use LBitmapList::DeleteItems.
You cannot use this function to update a bitmap list while it is being used in an animation playback.
Required DLLs and Libraries
LTFIL 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\\")pFileNameL_INT LBitmapList__RemoveItemExample(HWND hWnd){L_INT nRet;LBitmapList BitmapList;LBitmapBase Bitmap, PaintBitmap;HDC hDC;RECT rcClientRect;// load three images and insert them in the listBitmap.Load(MAKE_IMAGE_PATH(TEXT("image1.cmp")), 0,ORDER_BGR);BitmapList.Create ();BitmapList.InsertItem (&Bitmap);Bitmap.Load(MAKE_IMAGE_PATH(TEXT("image2.cmp")), 0,ORDER_BGR);BitmapList.InsertItem (&Bitmap);Bitmap.Load(MAKE_IMAGE_PATH(TEXT("ImageProcessingDemo\\Image3.cmp")), 0,ORDER_BGR);BitmapList.InsertItem (&Bitmap);// Set the DC and the Destination rectangleGetClientRect(hWnd, &rcClientRect);hDC = GetDC(hWnd);PaintBitmap.Paint()->SetDC(hDC);PaintBitmap.SetDstRect(&rcClientRect);// Remove an item and paint the removed itemnRet =BitmapList.RemoveItem (2, &PaintBitmap);if(nRet !=SUCCESS)return nRet;PaintBitmap.Paint()->PaintDC();ReleaseDC(hWnd, hDC);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
