#include "ltivw.h"
L_LTIVW_API L_INT L_DispContainerGetPaintCallBack(hCellWnd, ppfnPaintCallBack, ppUserData)
L_HWND hCellWnd; |
handle to the cell window |
DISPCONTAINERPAINTCALLBACK * ppfnPaintCallBack; |
pointer to paint callback function |
LPVOID * ppUserData; |
pointer to user data |
Gets the current paint callback function along with the user data, which were set using the L_DispContainerSetPaintCallBack function.
Parameter |
Description |
hCellWnd |
A handle to the window that represents the Medical Viewer Cell. |
ppfnPaintCallBack |
Pointer to a pointer to a callback function to be updated with the last paint callback function set using the L_DispContainerSetPaintCallBack function. |
ppUserData |
Void pointer to be updated with the user defined data associated with the paint callback. If you are not interested in the user-defined data, pass NULL for this parameter. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
To set the callback function used to handle painting, call L_DispContainerSetPaintCallBack.
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. |
Functions: |
DISPCONTAINERPAINTCALLBACK, L_DispContainerRepaintCell, L_DispContainerSetPaintCallBack. |
Topics: |
This function set a paint call back that draws an ellipse in the middle of the cell.
L_INT EXT_CALLBACK PaintCallBack(HWND hCellWnd, HDC hMemDC, LPRECT lpRect, L_INT, L_INT, L_VOID *)
{
UNREFERENCED_PARAMETER(hCellWnd);
Ellipse(hMemDC, lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
return SUCCESS;
}
L_INT DispContainerGetPaintCallBackExample(HDISPCONTAINER hCon)
{
L_INT nRet;
DISPCONTAINERPAINTCALLBACK OldPaintCallBack;
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);
nRet = L_DispContainerGetPaintCallBack(hCellWnd, &OldPaintCallBack, NULL);
nRet = L_DispContainerSetPaintCallBack(hCellWnd, PaintCallBack, NULL);
return SUCCESS;
}