L_DispContainerGetCellBitmapList

#include "ltivw.h"

L_LTIVW_API L_INT L_DispContainerGetCellBitmapList(hCellWnd, phBitmapList, uFlags)

L_HWND hCellWnd;

handle to the cell window

pHBITMAPLIST phBitmapList;

pointer to a variable to be updated

L_UINT uFlags;

reserved for future use

Gets the bitmap list attached to the specified cell.

Parameter

Description

hCellWnd

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

phBitmapList

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

uFlags

Reserved for future use. Pass 0.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

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

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_DispContainerCreate, L_DispContainerRemoveCell, L_DispContainerInsertCell, L_DispContainerGetCellCount, L_DispContainerGetCellWindowHandle, L_DispContainerSetCellBitmapList, L_DispContainerSetCellTag, L_DispContainerSetCellProperties, L_DispContainerGetCellProperties, L_DispContainerRepositionCell, L_DispContainerGetCellPosition, L_DispContainerGetCellBounds, L_DispContainerFreezeCell, L_DispContainerSelectCell, L_DispContainerIsCellSelected, L_DispContainerIsCellFrozen

Topics:

Image Viewer Cells

 

Image Viewer Functions: Image Viewer Cells

Example

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

L_LTIVWTEX_API  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_LTIVWTEX_API L_INT DispContainerImageProcessingExample(HDISPCONTAINER hCon, 
L_INT          nCellIndex) 
{ 
   BITMAPHANDLE Bitmap; 
   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; 
} 

Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Medical Image Viewer C API Help
Click or drag to resize