#include "l_bitmap.h"
L_LTZMV_API L_INT L_CreateZoomView(hWnd, pBitmap, pZoomViewProps)
HWND hWnd; |
handle to a window |
pBITMAPHANDLE pBitmap; |
pointer to the bitmap handle |
pZOOMVIEWPROPS pZoomViewProps; |
pointer to a structure |
Creates a new Zoom View and associates it with the specified window.
Parameter |
Description |
hWnd |
Handle to a window. |
pBitmap |
Pointer to the bitmap handle that references the bitmap displayed in hWnd. |
pZoomViewProps |
Pointer to a ZOOMVIEWPROPS structure containing options for controlling the behavior of the Zoom View. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Starts a Zoom View procedure by attaching a zoomed view to the specified window.
Note: |
Anytime the window's size changes or the bitmap changes, call the L_UpdateZoomView function in order to update the zoomed view settings. |
When the zoomed view is no longer needed, call the L_DestroyZoomView function to stop the specified Zoom View procedure and to detach it from the window handle.
Required DLLs and Libraries
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
L_WindowHasZoomView, L_GetZoomViewProps, L_UpdateZoomView, L_DestroyZoomView, L_GetZoomViewsCount |
Topics: |
|
|
|
|
This sample shows how you can start and stop the Zoom View. It also demonstrates how to provide a callback function and how this can help you to update Zoom View options.
L_INT CreateZoomViewExample(HDC hMemDC,
HWND hWnd,
pBITMAPHANDLE pBitmap,
RECT * prcView)
{
ZOOMVIEWPROPS ZoomViewProps;
L_INT nRet;
memset(&ZoomViewProps,0,sizeof(ZOOMVIEWPROPS));
ZoomViewProps.uStructSize = sizeof(ZOOMVIEWPROPS);
SetRect(&ZoomViewProps.rcSrc, 0, 0, 100* 100, 100* 100);
SetRect(&ZoomViewProps.rcDst, 100* 100, 100* 100, 200* 100, 200* 100);
ZoomViewProps.nZoom = 200;
ZoomViewProps.bForceDst = FALSE;
ZoomViewProps.bEnabled = TRUE;
ZoomViewProps.bCallouts = TRUE;
ZoomViewProps.crCallout = RGB(255,0,0);
ZoomViewProps.nCalloutPenStyle = PS_DASH;
ZoomViewProps.crZoomViewBorder = RGB(0,255,0);
ZoomViewProps.uZoomViewBorderStyle = ZOOMVIEWBORDERSTYLE_SIMPLE;
ZoomViewProps.nZoomViewPenStyle = PS_SOLID;
ZoomViewProps.crSrcBorder = RGB(0,0,255);
ZoomViewProps.uSrcBorderStyle = SOURCEBORDERSTYLE_SIMPLE;
ZoomViewProps.nSrcPenStyle = PS_DOT;
CopyRect(&ZoomViewProps.rcView, prcView);
nRet = L_CreateZoomView (hWnd, pBitmap, &ZoomViewProps);
if(nRet == SUCCESS)
{
HDC hDC = GetDC(hWnd);
L_RenderZoomView(hDC,hWnd);
ReleaseDC(hWnd, hDC);
}
else
{
return nRet;
}
nRet = L_RenderZoomView(hMemDC,hWnd);
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET