#include "ltwrappr.h"
virtual L_TCHAR * LImageViewerCell::BuiltInTagCallBack(hCellWnd, nSubCellIndex, uTagType, pString);
This callback is called before printing any built-in tag text.
A handle to the window that represents the Medical Viewer Cell.
A zero-based index of the sub-cell. This sub-cell contains the image that contains the region changed. Pass -2 to refer to the selected sub-cell.
The built-in tag that is about to be printed on the cell/sub-cell. Possible values are:
| Value | Meaning |
|---|---|
| DISPWIN_TYPE_SCALE | [1] Scale tag. |
| DISPWIN_TYPE_WLCENTERWIDTH | [2] Window level tag. |
| DISPWIN_TYPE_FIELDOFVIEW | [3] Field of view tag. |
| DISPWIN_TYPE_OWNERDRAW | [4] Owner draw tag. |
| DISPWIN_TYPE_FRAME | [5] Frame tag. |
| DISPWIN_TYPE_RULERUNIT | [6] The ruler unit. |
| DISPWIN_TYPE_LEFTORIENTATION | [7] Reserved for future. |
| DISPWIN_TYPE_RIGHTORIENTATION | [8] Reserved for future. |
| DISPWIN_TYPE_TOPORIENTATION | [9] Reserved for future. |
| DISPWIN_TYPE_BOTTOMORIENTATION | [10] Reserved for future. |
| DISPWIN_TYPE_OFFSET | [11] Image Offset tag. |
| DISPWIN_TYPE_ALPHA | [12] Alpha value tag. |
A string containing the built-in tag text, the user can update this value to display instead.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| 1 | An error occurred. Refer to Return Codes. |
This callback is called before printing any built-in tag text.
To enable or disable the callback function for built-tags of the cell, call the LImageViewerCell::EnableBuiltInTagCallBack function.
Required DLLs and Libraries
This example converts the annotation object (rectangle, ellipse and hilite) into a region once the user draws them.
#ifdef LImageViewerChildclass LImageViewerChild :public LImageViewerCell{virtual L_TCHAR * BuiltInTagCallBack(L_HWND hCellWnd,L_INT nSubCellIndex,L_UINT uTagType,L_TCHAR * pString);};#endifLImageViewerCell * gImageViewerCell;L_TCHAR * szOutput = NULL;L_TCHAR * LImageViewerChild::BuiltInTagCallBack(L_HWND hCellWnd,L_INT nSubCellIndex,L_UINT uTagType,L_TCHAR * pString){UNREFERENCED_PARAMETER(nSubCellIndex);UNREFERENCED_PARAMETER(hCellWnd);if (uTagType == DISPWIN_TYPE_SCALE){L_DOUBLE dScale;gImageViewerCell->GetCellScale(0, &dScale, 0);//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;}elsereturn pString;}L_INT LImageViewer_BuiltInTagCallBackExample(LImageViewerCell& ImageViewerCell){gImageViewerCell = &ImageViewerCell;ImageViewerCell.EnableBuiltInTagCallBack(TRUE);return SUCCESS;}