LImageViewerCell::ActiveSubCellChangedCallBack

#include "ltwrappr.h"

virtual L_INT LImageViewerCell::ActiveSubCellChangedCallBack(hCellWnd, nCellIndex, nSubCellIndex, nPreviousSubCellIndex)

HWND hCellWnd;

handle to the cell window

L_INT nCellIndex;

index of the cell

L_INT nSubCellIndex;

index of the sub-cell

L_INT nPreviousSubCellIndex;

index into the image list attached to the cell

This callback function is called every time the user changes the active sub-cell.

Parameter

Description

hCellWnd

A handle to the window that represents the Medical Viewer Cell.

nCellIndex

A zero-based index of the cell, that contains the sub-cell that been changed.

nSubCellIndex

A zero-based index of the new active sub-cell.

nPreviousSubCellIndex

A zero-based index of the sub-cell that was active before changing the active sub-cell index.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This callback happens when the sub-cell is changed, which occurs by:

1.

Clicking on another sub-cell rect.

2.

Scrolling the cell scroll.

In order to use this callback function, it must first be set by calling the LImageViewerCell::EnableActiveSubCellChangedCallBack 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.

See Also

Functions:

LImageViewerCell::RegionCallBack, LImageViewerCell::EnableRegionCallBack, LImageViewerCell::MouseCallBack, LImageViewerCell::ActionCallBack, LImageViewerCell::TagCallBack, LImageViewerCell::EnableTagCallBack, LImageViewerCell::AnnotationCallBack, LImageViewerCell::EnableAnnotationCallBack, LImageViewerCell::EnableAnnotationCreatedCallBack, LImageViewerCell::AnnotationCreatedCallBack, LImageViewerCell::PrePaintCallBack, LImageViewerCell::EnablePrePaintCallBack, LImageViewerCell::EnablePostPaintCallBack, LImageViewerCell::PostPaintCallBack, Class Members

Topics:

Image Viewer Cells

 

Image Viewer Functions: Image Viewer Cells

 

Image Viewer Functions: Callbacks

Example

This example will link the active sub-cell of the first cell to the second cell and vice versa.

#ifdef LImageViewerChild 
class LImageViewerChild :public LImageViewerCell 
{ 
   virtual L_INT ActiveSubCellChangedCallBack(HWND hCellWnd, 
   L_INT    nCellIndex, 
   L_INT    nSubCellIndex, 
   L_INT    nPreviousSubCellIndex); 
}; 
#endif 
L_INT LImageViewerChild::ActiveSubCellChangedCallBack(HWND hCellWnd, 
L_INT    nCellIndex, 
L_INT    nSubCellIndex, 
L_INT    nPreviousSubCellIndex) 
{ 
   UNREFERENCED_PARAMETER(hCellWnd); 
   UNREFERENCED_PARAMETER(nCellIndex); 
   UNREFERENCED_PARAMETER(nPreviousSubCellIndex); 
   DISPSTACKACTIONPROPS ActionProperties; 
   DISPCELLPROPERTIES CellProp; 
   CellProp.uStructSize = sizeof(DISPCELLPROPERTIES); 
   CellProp.uMask = DCCELLPF_ROWS | DCCELLPF_COLS; 
   ActionProperties.DispContainerActionProps.uStructSize = sizeof(DISPSTACKACTIONPROPS); 
   GetActionProperties(CONTAINER_ACTION_STACK, 0, &ActionProperties, 0); 
   GetCellProperties(&CellProp, 0); 
   ActionProperties.nActiveSubCell = nSubCellIndex % (CellProp.uNumCols * CellProp.uNumRows); 
   ActionProperties.nScrollValue = nSubCellIndex - ActionProperties.nActiveSubCell; 
   SetActionProperties( CONTAINER_ACTION_STACK, 0, &ActionProperties, CONTAINER_ACTION_CELLLEVEL); 
   return SUCCESS; 
} 
L_INT LImageViewer_ActiveSubCellChangedExample(LImageViewerCell& ImageViewerCell) 
{ 
   ImageViewerCell.EnableActiveSubCellChangedCallBack( TRUE); 
   return SUCCESS; 
} 

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++ Class Library Help