Gets the bitmap list attached to the specified cell.


#include "ltivw.h"

L_LTIVW_API L_INT L_DispContainerGetCellBitmapList(hCellWnd, phBitmapList, uFlags)


L_HWND hCellWnd

A handle to the window that represents the cell on which the function's effect will be applied.


Pointer to the variable to be updated with the cell's bitmap list.

L_UINT uFlags

Reserved for future use. Pass 0.


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


If the cell at the specified index has no image, phBitmapList will be NULL.

Call L_DispContainerSetCellBitmapList to set the bitmap list for a cell.

Required DLLs and Libraries

See Also




This function removes the specified cell without removing its image list.

L_INT DispContainerGetCellBitmapListExample(HDISPCONTAINER hCon, 
                                                            HBITMAPLIST  * hBitmapList, 
                                                            L_INT          nCellIndex) 
   L_INT nRet; 
   L_INT nCount = L_DispContainerGetCellCount (hCon, 0);  
   // Check the validity of the cell index 
   if ((nCellIndex < 0) || (nCellIndex >= nCount))  
      return 0;  
   HWND hCellWnd = L_DispContainerGetCellWindowHandle(hCon, nCellIndex, 0); 
   // retrieve the bitmap list.  
   nRet = L_DispContainerGetCellBitmapList(hCellWnd, hBitmapList, 0);  
   if(nRet != SUCCESS) 
      return nRet; 
   // remove the cell 
   nRet = L_DispContainerRemoveCell (hCon, nCellIndex, 0);  
   if(nRet != SUCCESS) 
      return nRet; 
   return SUCCESS; 
L_INT DispContainerImageProcessingExample(HDISPCONTAINER hCon, 
                                                         L_INT          nCellIndex) 
   HBITMAPLIST hBitmapList; 
   if (L_DispContainerGetCellCount(hCon, 0) == 0) 
      MessageBox(NULL, TEXT("you must at least have one cell added to the viewer"), TEXT("No Cell attached"), MB_OK); 
      return FAILURE; 
   HWND hCellWnd = L_DispContainerGetCellWindowHandle(hCon, 0, 0); 
   // Get the bitmap list of the first cell. 
   L_INT nRet = L_DispContainerGetCellBitmapList(hCellWnd, &hBitmapList, 0); 
   if (nRet != SUCCESS) 
      return nRet; 
   //Deattach the bitmap list from the contianer inorder to perform some image processing on it. 
   nRet = L_DispContainerSetCellBitmapList(hCellWnd, NULL, 0, 0); 
   if (nRet != SUCCESS) 
      return nRet; 
   // get the first bitmap in the bitmap list . 
   nRet = L_GetBitmapListItem(hBitmapList, nCellIndex, &Bitmap, sizeof(BITMAPHANDLE)); 
   if (nRet != SUCCESS) 
      return nRet; 
   // fill the bitmap will the desiared color. 
   nRet = L_MultiScaleEnhancementBitmap(&Bitmap, 2000, 4, MSE_DEFAULT , 0, 0, MSE_GAUSSIAN | MSE_EDGEENH); 
   if(nRet !=SUCCESS) 
      return nRet; 
   // set the bitmap list again. 
   nRet = L_SetBitmapListItem(hBitmapList, nCellIndex, &Bitmap); 
   nRet = L_DispContainerSetCellBitmapList(hCellWnd, hBitmapList, 0, 0); 
   return nRet; 

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

LEADTOOLS Medical Image Viewer C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.