L_DispContainerRepositionCell

#include "ltivw.h"

L_INT EXT_FUNCTION L_DispContainerRepositionCell(hCon, nCellIndex, nTargetCellIndex, uFlags)

HDISPCONTAINER hCon;

/* handle to the container */

L_INT nCellIndex;

/* index of a cell */

L_INT nTargetCellIndex;

/* the new index of the cell */

L_UINT uFlags ;

/* reserved for future use */

Sets the position of the specified cell, based on the index of the cell. 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 set the position.

nTargetCellIndex

A zero-based index of the new cell position.

uFlags

Reserved for future use. Must be zero.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

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_DispContainerGetWindowHandle, L_DispContainerSetCellTag, L_DispContainerSetCellProperties, L_DispContainerGetCellProperties, L_DispContainerGetCellPosition, L_DispContainerGetCellBitmapList, L_DispContainerGetCellBounds, L_DispContainerFreezeCell, L_DispContainerSetBounds, L_DispContainerSelectCell, L_DispContainerIsCellSelected

Topics:

Image Viewer Cells

 

Image Viewer Functions: Image Viewer Cells

Example

// This function shuffles the order of the cells
L_VOID ScrambleCellsOrder(HDISPCONTAINER hCon) 
{
   L_INT nI, nCount; 

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

   srand((L_INT)GetCurrentTime());

   // Shuffles all the cells
   for (nI = 0; nI < nCount; nI++)
      L_DispContainerRepositionCell (hCon, nI, (rand() % nCount), 0); 
}