LBitmapList::DeleteItems

#include "ltwrappr.h"

virtual L_INT LBitmapList::DeleteItems(uIndex, uCount=1)

Deletes a set of bitmaps from the class object's bitmap list.

Parameters

L_UINT uIndex

Index of the first bitmap to delete.

L_UINT uCount

Number of bitmaps to delete. You can specify (L_UINT) -1 to delete to the end of the list.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This removes the bitmaps from the class object's bitmap list and frees the bitmaps.

You cannot use this function to update a bitmap list while it is being used in an animation playback.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT LBitmapList__DeleteItemsExample(HWND hWnd) 
{ 
   L_INT nRet; 
   LBitmapList BitmapList; 
   LBitmapBase Bitmap; 
   L_TCHAR szDummyBuffer[50]; 
   L_INT nCount; 
 
   nRet =BitmapList.Create (); 
   if(nRet !=SUCCESS) 
      return nRet; 
   // load three images and insert them in the list 
   nRet =Bitmap.Load(MAKE_IMAGE_PATH(TEXT("image1.cmp")), 0,ORDER_BGR); 
   if(nRet !=SUCCESS) 
      return nRet; 
   nRet =BitmapList.InsertItem (&Bitmap); 
   if(nRet !=SUCCESS) 
      return nRet; 
   nRet =Bitmap.Load(MAKE_IMAGE_PATH(TEXT("image2.cmp")), 0,ORDER_BGR); 
   if(nRet !=SUCCESS) 
      return nRet; 
   nRet =BitmapList.InsertItem (&Bitmap); 
   if(nRet !=SUCCESS) 
      return nRet; 
   nRet =Bitmap.Load(MAKE_IMAGE_PATH(TEXT("ImageProcessingDemo\\Image3.cmp")), 0,ORDER_BGR); 
   if(nRet !=SUCCESS) 
      return nRet; 
   nRet =BitmapList.InsertItem (&Bitmap); 
   if(nRet !=SUCCESS) 
      return nRet; 
 
   // Delete all items 
   nRet =BitmapList.DeleteItems (0, BitmapList.GetItemsCount()); 
   if(nRet !=SUCCESS) 
      return nRet; 
   nCount = BitmapList.GetItemsCount (); 
   wsprintf(szDummyBuffer, TEXT("List contains %d items."), nCount); 
   MessageBox(hWnd, szDummyBuffer, TEXT("LBitmapList"), MB_OK); 
    
   return SUCCESS; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.