Gets the current built-in tag callback function along with the user data, which were set using L_DispContainerSetBuiltInTagCallBack.
#include "ltivw.h"
L_LTIVW_API L_INT L_DispContainerGetBuiltInTagCallBack(hCellWnd, ppBuiltInTagCallBack, ppUserData);
A handle to the window that represents the Medical Viewer Cell.
Pointer to a pointer to a callback function to be updated with the last action callback function set using L_DispContainerSetBuiltInTagCallBack.
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.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
1 | An error occurred. Refer to Return Codes. |
To set the current callback function used to handle the built-in tag, call L_DispContainerSetBuiltInTagCallBack
.
The built-in tag is an overlay text that gets updated automatically once the image changes its correspondent property.
To add a tag to the medical viewer, use the function L_DispContainerSetCellTag.
This function get built-in tag call.
L_TCHAR * szOutput = NULL;
L_TCHAR * EXT_CALLBACK pBuildInTagCallback (L_HWND hCellWnd,
L_INT nSubCellIndex,
L_UINT uTagType,
L_TCHAR * pString,
L_VOID * pUserData)
{
UNREFERENCED_PARAMETER(pUserData);
if (uTagType == DISPWIN_TYPE_SCALE)
{
L_DOUBLE dScale;
L_DispContainerGetCellScale(hCellWnd, nSubCellIndex, &dScale, 0);
if (szOutput == NULL)
szOutput = (L_TCHAR *)malloc(sizeof(L_TCHAR) * 100);
wsprintf(szOutput, TEXT("Scale Value is = %f4"), dScale);
return szOutput;
}
else
return pString;
}
L_INT L_DispContainerGetBuiltInTagCallBackExample(HWND hCellWnd)
{
L_VOID * pUserData;
DISPCONTAINERBUILTINTAGCALLBACK pBuildInTag;
L_DispContainerSetCellTag(hCellWnd, 1, DISPWIN_ALIGN_TOPLEFT, DISPWIN_TYPE_SCALE, NULL, 0);
L_DispContainerGetBuiltInTagCallBack(hCellWnd, &pBuildInTag, &pUserData);
L_DispContainerSetBuiltInTagCallBack(hCellWnd, pBuildInTagCallback, NULL);
return SUCCESS;
}