"l_bitmap.h"
L_LTZMV_API L_INT L_StartZoomViewAnnEdit(hWnd, pZoomViewAnnEdit)
Puts the Zoom Views that are attached to the specified window into annotation edit mode.
Handle to a window.
Pointer to a ZOOMVIEWANNEDIT structure that specifies the annotation edit options to set.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function is used together with L_StopZoomViewAnnEdit to toggle the annotation edit mode. For information on using a zoom view with annotations, see the documentation for L_CreateZoomView and ZOOMVIEWPROPS. Once you have properly set up a zoom view that is using annotations, call the L_StartZoomViewAnnEdit function to display any annotations in edit mode or design mode. In edit mode, annotations can be created, and existing annotations can be modified, or deleted. To end the annotation edit mode (or to display the annotations in run-mode), call the function L_StopZoomViewAnnEdit function.
Required DLLs and Libraries
Win32, x64.
This sample shows how to toggle the annotation edit mode of a Zoom View from design mode to run mode. It is part of the ZoomView demo that ships with the toolkit.
// WINDOWDATA is used to associate window data with each window that contains zoom view objects.
// Each window will have a valid annotation hAutomation object, and a valid annotation hContainer object.
// For details on creating the hAutomation object and the hContainer object, see the ZoomView demo
typedef struct tagWINDOWDATA
{
L_INT nActiveZoomView;
HANNOBJECT hContainer;
HANNOBJECT hAutomation;
// Other window data...
} WINDOWDATA, *LPWINDOWDATA ;
HWND ghwndToolbar = NULL;
L_INT gnAnnUserMode = ANNUSER_DESIGN;
BOOL CALLBACK AnnEnumAnnUserModeProc(HWND hwnd, LPARAM lParam)
{
LPWINDOWDATA pData = (LPWINDOWDATA)(LONG_PTR)GetWindowLongPtr(hwnd,GWLP_USERDATA);
L_INT nAnnUserMode = (L_INT)lParam;
if (pData && pData->hContainer)
{
L_INT nRet = L_AnnSetUserMode(pData->hContainer, nAnnUserMode);
if (nRet == SUCCESS)
{
if (nAnnUserMode == ANNUSER_DESIGN)
{
ZOOMVIEWANNEDIT ZoomViewAnnEdit;
memset(&ZoomViewAnnEdit, 0, sizeof(ZoomViewAnnEdit));
ZoomViewAnnEdit.uStructSize = sizeof(ZoomViewAnnEdit);
ZoomViewAnnEdit.hAnnAutomation = pData->hAutomation;
ZoomViewAnnEdit.hWndAnnToolbar = ghwndToolbar;
L_StartZoomViewAnnEdit(hwnd, &ZoomViewAnnEdit);
}
else
{
L_StopZoomViewAnnEdit(hwnd);
}
}
}
return TRUE; //Continues enumeration
}
// hwnd - handle to the parent window of the zoom view
// bAnnotationEditMode - true: change to annotation edit mode
// - false: change to annotation run mode
L_INT ChangeZoomViewAnnotationMode(HWND hwnd, L_BOOL bAnnotationEditMode)
{
if (bAnnotationEditMode)
{
if (gnAnnUserMode != ANNUSER_DESIGN)
{
if (!ghwndToolbar)
{
POINT ptToolbar = {0,0};
L_AnnCreateToolBar(hwnd, &ptToolbar,
ANNTOOLALIGN_LEFT | ANNTOOLALIGN_TOP, FALSE, &ghwndToolbar, 0, NULL);
}
if (ghwndToolbar)
ShowWindow(ghwndToolbar,SW_NORMAL);
EnumChildWindows(GetParent(hwnd), AnnEnumAnnUserModeProc, ANNUSER_DESIGN);
gnAnnUserMode = ANNUSER_DESIGN;
}
}
else // annotation run mode
{
if (gnAnnUserMode != ANNUSER_RUN)
{
if (ghwndToolbar)
ShowWindow(ghwndToolbar,SW_HIDE);
EnumChildWindows(GetParent(hwnd), AnnEnumAnnUserModeProc, ANNUSER_RUN);
gnAnnUserMode = ANNUSER_RUN;
}
}
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document