L_DispContainerGetPrePaintCallBack

Summary

Gets the current action callback function along with the user data, which were set using L_DispContainerSetPrePaintCallBack.

Syntax

#include "ltivw.h"

L_LTIVW_API L_INT EXT_FUNCTION L_DispContainerGetPrePaintCallBack(hCellWnd, ppfnCallBack, ppUserData)

Parameters

L_HWND hCellWnd

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

DISPCONTAINERPREPAINTCALLBACK * ppfnCallBack

Pointer to a pointer to a callback function to be updated with the last pre-paint callback function set using L_DispContainerSetPrePaintCallBack.

LPVOID * ppUserData

Void pointer to be updated with the value of user defined data associated with the tag callback. If you are not interested in the user-defined data, pass NULL for this parameter.

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

This example hides the odd frames

L_INT EXT_CALLBACK PrePaintCallBack(HWND hCellWnd, 
                                    pDISPCONTAINERCELLINFO pCellInfo, 
                                    L_VOID *               pUserData) 
{ 
   UNREFERENCED_PARAMETER(hCellWnd); 
   UNREFERENCED_PARAMETER(pUserData); 
   if ((pCellInfo->nSubCellIndex | 0x1) != pCellInfo->nSubCellIndex) 
   { 
      FillRect(pCellInfo->hDC, &pCellInfo->rcRect, GetStockBrush(GRAY_BRUSH)); 
      return FAILURE; 
   } 
   return SUCCESS; 
} 
 
L_INT DispContainerPrePaintExample(HDISPCONTAINER hCon) 
{ 
   DISPCONTAINERPREPAINTCALLBACK oldCallBack; 
   L_VOID *                      pOldUserData; 
 
   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); 
 
   L_DispContainerGetPrePaintCallBack(hCellWnd, &oldCallBack, &pOldUserData); 
 
   L_DispContainerSetPrePaintCallBack(hCellWnd, PrePaintCallBack, hCon); 
 
   return SUCCESS; 
} 

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 API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.