#include "l_bitmap.h"

L_INT pEXT_CALLBACK YourFunction(hWnd, nMaskPlaneStart, nMaskPlaneEnd, pMaskPlane, nMaskPlaneSize, pUserData)

Handles the WM_LBUTTONDOWN, WM_LBUTTONUP and WM_MOUSEMOVE messages received by the window to which the Magnifying Glass is attached.



Handle of the window to which the Magnifying Glass is attached.

L_INT nMaskPlaneStart

The start position of the mask plane array.

L_INT nMaskPlaneEnd

The end position of the mask plane array.

L_UCHAR* pMaskPlane

An array of bit flags which represents a mask plane. This array works as a plane for the parts of the bitmap that are not yet updated.

L_SIZE_T nMaskPlaneSize

The size of the bit flags array in bytes.

L_VOID* pUserData

A void pointer that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. (This is the same pointer that you pass in the pUserData parameter of L_StartMagGlass.)Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function.


Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.


This is an optional callback function used by the L_StartMagGlass function. It is called by L_StartMagGlass for each WM_LBUTTONDOWN, WM_MOUSEMOVE and WM_LBUTTONUP message received by the window to which the magnifying glass is attached.

In order to use this callback function, a pointer to this function must be passed to L_StartMagGlass. Once that is done, information about the non-updated parts of the bitmap can be obtained from this callback function, in the pMaskPlane parameter. This callback function receives information when the left mouse button is pressed or released and when the mouse is moved while the left mouse button is pressed. This information can be used to determine when to call L_UpdateMagGlass.

The information received by this function can be passed to the LEADTOOLS Internet functions to get pixel values of the non-updated parts of the bitmap. This information can then be passed to L_UpdateMagGlass to update the Magnifying Glass zoomed image.

If a callback function is passed to L_StartMagGlass, L_UpdateMagGlass must be called in order to paint the zoomed image in the Magnifying Glass display area.

Required DLLs and Libraries

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help