#include "l_bitmap.h"
L_LTDIS_APIL_INTL_UpdateMagGlassRect(hWnd, prcDst)
Updates the Magnify Glass procedure with a new destination rectangle.
Handle of the window to which the Magnifying Glass is attached.
Pointer to the Windows RECT structure that determines how image is positioned in the device context. The coordinates in the RECT structure are relative to the device context. There is no default for this parameter. You must specify the RECT structure.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer toReturn Codes. |
This function should be called anytime the image's destination rectangle has been updated in an application. For example, if the image is scrolled or zoomed, call this function with the new destination rectangle.
Required DLLs and Libraries
Win32, x64.
This sample comes from the Main API Demo "CHILD.C".
This is not a complete sample.
Refer to CHILD.C for the complete code.
L_INT UpdateMagGlassRectExample(L_HWND hWnd, L_HWND hWndCtl, UINT nCode,intnPos)
{
L_INT nRet;
LPCHILDDATA pData;
L_INT nScrollInc;
L_BOOL fInScroll;
UNREFERENCED_PARAMETER(hWndCtl);
pData = LOCKCHILDDATA(GetParent(hWnd));
fInScroll = TRUE;
switch(nCode)
{
caseSB_LEFT:
nScrollInc = -pData->nHScrollPos;
break;
caseSB_RIGHT:
nScrollInc = pData->nHScrollMax - pData->nHScrollPos;
break;
caseSB_LINELEFT:
nScrollInc = -pData->nHScrollStep;
break;
caseSB_LINERIGHT:
nScrollInc = pData->nHScrollStep;
break;
caseSB_PAGELEFT:
nScrollInc = -max (pData->nHScrollStep, (pData->cxClient -
pData - > nHScrollStep));
break;
caseSB_PAGERIGHT:
nScrollInc = max (pData->nHScrollStep, (pData->cxClient -
pData - > nHScrollStep));
break;
caseSB_THUMBTRACK:
caseSB_THUMBPOSITION:
nScrollInc = (nPos << pData->nHScrollFactor) - pData->nHScrollPos;
break;
default:
nScrollInc = 0;
break;
}
nScrollInc = max (-pData->nHScrollPos,
min (nScrollInc, (pData->nHScrollMax -
pData - > nHScrollPos)));
if(nScrollInc)
{
pData - > nHScrollPos += nScrollInc;
OffsetRect (&pData->rcView, -nScrollInc, 0);
ScrollWindow (hWnd, -nScrollInc, 0, NULL, NULL);
SetScrollPos (hWnd, SB_HORZ, pData->nHScrollPos >>
pData - > nHScrollFactor, TRUE);
UpdateWindow (hWnd);
}
if( pData->bMagGlass )
{
nRet = L_UpdateMagGlassRect (pData->hBitmapWnd, &pData->rcView);
if(nRet != SUCCESS)
returnnRet;
}
UNLOCKCHILDDATA (GetParent(hWnd));
fInScroll = FALSE;
returnSUCCESS;
}
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
188宝金博怎么下载
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.