L_RemoveBitmapListItem

#include "l_bitmap.h"

L_LTKRN_API L_INT L_RemoveBitmapListItem(hList, uIndex, pBitmap)

Removes a bitmap from the list, and lets you treat it as an individual bitmap.

Parameters

HBITMAPLIST hList

Handle to the list of bitmaps.

L_UINT 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.

pBITMAPHANDLE pBitmap

Pointer to the bitmap handle that you can use afterward to work with the individual bitmap.

Returns

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

Comments

This function does not free the bitmap. If you want to remove a bitmap from a list and free the bitmap, you should use L_DeleteBitmapListItems.

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, Linux.

See Also

Functions

Topics

Example

This example removes even numbered bitmaps from a list and deletes them.

L_INT RemoveBitmapListItemExample(HBITMAPLIST hList) 
{ 
   L_INT nRet; 
   BITMAPHANDLE   TmpBitmap;  /* Temporary bitmap for manipulating the list */ 
   L_UINT         i;          /* Loop counter */ 
   L_UINT         uCount;     /* Number of bitmaps in the list */ 
 
   /* Remove even numbered bitmaps from the list and delete them */ 
   nRet = L_GetBitmapListCount(hList, &uCount); 
   if(nRet != SUCCESS) 
      return nRet; 
   for (i = 0; i <= uCount; i += 2) 
   { 
      nRet = L_RemoveBitmapListItem(hList, i, &TmpBitmap); 
      L_FreeBitmap(&TmpBitmap); 
   } 
       
   return SUCCESS; 
} 

Help Version 20.0.2019.12.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help