virtual L_INT LBitmapList::RemoveItem(uIndex, pRemovedBitmap)
Removes a bitmap from the list.
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.
Pointer to the bitmap object that references the removed bitmap. You can use this object afterward to work with the individual bitmap.
Value | Meaning |
---|---|
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.
Win32, x64.
L_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 list
Bitmap.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 rectangle
GetClientRect(hWnd, &rcClientRect);
hDC = GetDC(hWnd);
PaintBitmap.Paint()->SetDC(hDC);
PaintBitmap.SetDstRect(&rcClientRect);
// Remove an item and paint the removed item
nRet =BitmapList.RemoveItem (2, &PaintBitmap);
if(nRet !=SUCCESS)
return nRet;
PaintBitmap.Paint()->PaintDC();
ReleaseDC(hWnd, hDC);
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