L_DispContainerPrintSubCell

#include "l_bitmap.h"

L_LTIVW_API L_HBITMAP EXT_FUNCTION L_DispContainerPrintSubCell(hCellWnd, nSubCellIndex, uFlags)

L_HWND hCellWnd;

handle to the cell window

L_INT nSubCellIndex;

index into the image list attached to the cell

L_UINT uFlags;

flag

Returns a printable version of the specified sub-cell.

Parameter Description
hCellWnd A handle to the window that represents the cell on which the function's effect will be applied.
nSubCellIndex A zero-based index into the image list attached to the cell specified in nCellIndex. This sub-cell will be printed. Pass -1 to print the entire cell. Pass -2 to print the selected sub-cell.
uFlags Flag that indicate which part of the cell to print. You can use a bitwise OR (|) to specify one or more flags from each group.
  The following are the flags that indicates which part of the cell is going to be printed:
  Value Meaning
  CONTAINER_PRINTCELL_ALL [0x0000001F] Print everything on the cell of the returned HBITMAP.
  CONTAINER_PRINTCELL_REGION [0x00000001] Print the region.
  CONTAINER_PRINTCELL_ANNOTATION [0x00000002] Print the annotation if any.
  CONTAINER_PRINTCELL_BORDERS [0x00000004] Print the border.
  CONTAINER_PRINTCELL_TAG [0x00000008] Print the tags.
  CONTAINER_PRINTCELL_RULERS [0x00000010] Print the ruler.
  CONTAINER_PRINTCELL_NONE [0x00000000] None.
  The following flag is used to resize the sub-cell to fit the entire cell area when printed. This value is ignored if nSubCellIndex is set to -1.
  Value Meaning
  CONTAINER_PRINTCELL_EXPLODED [0x00000020] Expand the sub-cell to fit the entire cell area.

Returns

HBITMAP

The function was successful.

NULL

An error occurred. Refer to Return Codes. To get the error call GetLastError() function.

Comments

You can print any sub-cell even if it is not currently being viewed.

To print the entire cell, call L_DispContainerPrintCell function.

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.

Platforms

The toolkit comes in Win32 and x64 editions that can support development of software applications for any of the following environments:

Windows 10

Windows 8

Windows 7

Windows Vista

Windows XP

Windows 2000

See Also

Functions:

L_DispContainerCreate, L_DispContainerDestroy, L_DispContainerPrintCell, L_DispContainerRepaintCell, L_DispContainerUpdateCellView.

Topics:

Image Viewer Cells

 

Image Viewer Functions: Image Viewer Cells

Example

This example print the first sub-cell of the first cell without including the annotation if any exist

HBITMAP DispContainerPrintSubCellExample(HDISPCONTAINER hCon) 
{ 
   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 NULL; 
   } 
   HWND hCellWnd = L_DispContainerGetCellWindowHandle(hCon, 0, 0); 
   HBITMAP hBitmap = L_DispContainerPrintSubCell(hCellWnd, 0, CONTAINER_PRINTCELL_ALL ^ CONTAINER_PRINTCELL_ANNOTATION); 
   return hBitmap; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Medical Image Viewer C API Help