L_DispContainerGetActiveSubCell

#include "ltivw.h"

L_LTIVW_API L_INT L_DispContainerGetActiveSubCell(hCellWnd, nSubCellIndex, uFlags)

Gets the index of the active sub-cell.

Parameters

L_HWND hCellWnd

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

L_INT * nSubCellIndex

Pointer to a variable to be updated with sub-cell index.

L_UINT uFlags

Reserved for future use. Pass 0.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Required DLLs and Libraries

See Also

Functions

Topics

Example

Retrieves the active sub-cell index of the first cell in the medical viewer.

#if defined LEADTOOLS_V175_OR_LATER  
L_INT DispContainerGetActiveSubCellExample(HDISPCONTAINER hCon)  
{  
   L_INT nRet;  
   L_INT nSubCellIndex;  
   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 FAILURE;  
   }  
   HWND hCellWnd = L_DispContainerGetCellWindowHandle(hCon, 0, 0);  
   // Check if there is any action added to the container.  
   nRet = L_DispContainerGetActiveSubCell(hCellWnd, (L_INT *)&nSubCellIndex, 0);  
   if(nRet != SUCCESS)  
      return nRet;  
   return nSubCellIndex;  
}  
#endif  

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

LEADTOOLS Medical Image Viewer C API Help