L_DispContainerGetCellPosition

#include "ltivw.h"

L_INT EXT_FUNCTION L_DispContainerGetCellPosition(hCon, nCellIndex, puRow, puCol, uFlags)

HDISPCONTAINER hCon;

/* handle to the container */

L_INT nCellIndex;

/* index of the cell */

L_UINT L_FAR * puRow;

/* pointer to a variable to be updated */

L_UINT L_FAR * puCol;

/* pointer to a variable to be updated */

L_UINT uFlags;

/* reserved for future use */

Retrieves the column and row number for the cell with the specified index. This function is available only in the Medical Imaging Suite toolkits.

Parameter

Description

hCon

Handle to the container.

nCellIndex

A zero-based index of the cell for which to get the position.

puRow

Pointer to a variable to be updated with the vertical position (row) of the specified cell. Row numbering starts with 1.

puCol

Pointer to a variable to be updated with the horizontal position (column) of the specified cell. Column numbering starts with 1.

uFlags

Reserved for future use. Must be zero.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The row and column numbers obtained by this function are relative to the first cell in the container.

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_DispContainerGetCellBitmapList, L_DispContainerGetCellBounds, L_DispContainerFreezeCell, L_DispContainerSelectCell, L_DispContainerIsCellSelected, L_DispContainerIsCellFrozen

Topics:

Image Viewer Cells

 

Image Viewer Functions: Image Viewer Cells

Example

// This function scroll down or up in order to make the cell become visible
L_VOID GotoCell(HDISPCONTAINER hCon, L_INT nCellIndex) 
{
   L_INT nCount; 
   L_UINT uRow; 
   L_UINT uCol; 
   DISPCONTAINERPROPERTIES DispContainerProp; 

   // Get Cells Count
   nCount = L_DispContainerGetCellCount (hCon, 0); 

   if ((nCellIndex < 0) || (nCellIndex >= nCount)) 
      return; 

   // get the row count of the container
   DispContainerProp.uStructSize = sizeof(DISPCONTAINERPROPERTIES); 
   DispContainerProp.uMask = DCPF_NUMROWS; 
   L_DispContainerGetProperties (hCon, &DispContainerProp, 0); 

   // get the row and the col position
   L_DispContainerGetCellPosition(hCon, nCellIndex, &uRow, &uCol, 0); 

   L_DispContainerSetFirstVisibleRow (hCon, max(0, ((L_INT)uRow - (L_INT)DispContainerProp.uNumRows + 1)), 0); 
}