LImageViewerCell::PrintSubCell

Summary

Returns a printable version of the specified sub-cell.  This feature is available in version 16 or higher.

Syntax

#include "ltwrappr.h"

HBITMAP LImageViewerCell::PrintSubCell(nSubCellIndex, uFlags)

Parameters

L_INT nSubCellIndex

A zero-based index into the image list attached to the cell. This sub-cell will be printed. Pass -1 to print the entire cell. Pass -2 to print the selected sub-cell.

L_UINT 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

Value Meaning
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 the LImageViewerCell::PrintCell function.

Required DLLs and Libraries

See Also

Functions

Topics

Example

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

HBITMAP LImageViewer_PrintSubCellExample(LImageViewerCell& /*ImageViewerCell*/) 
{ 
   //HBITMAP hBitmap = ImageViewerCell.PrintSubCell(0, CONTAINER_PRINTCELL_ALL ^ CONTAINER_PRINTCELL_ANNOTATION); 
 
   //return hBitmap; 
   return NULL; 
} 
 
HBITMAP LImageViewer_PrintSubCellExample(LImageViewer& /*ImageViewer*/) 
{ 
   //HBITMAP hBitmap = ImageViewer.PrintSubCell( 0, 0, CONTAINER_PRINTCELL_ALL ^ CONTAINER_PRINTCELL_ANNOTATION); 
 
   //return hBitmap; 
   return NULL; 
} 

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

LEADTOOLS Medical Image Viewer C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.