#include "l_bitmap.h"

L_INT pEXT_CALLBACK YourFunction(hWnd, hMemDC, nXPos, nYPos, pMagGlass, pUserData)

Provides additional, user-defined Magnifying Glass painting.



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


Memory HDC into which the Magnifying Glass has been rendered. This is the HDC into which the callback should render any additional information.


The X-coordinate of the current position (in client coordinates) of the Magnifying Glass.


The Y-coordinate of the current position (in client coordinates) of the Magnifying Glass.

L_RECT* pMagGlass

The current bounding rectangle (in client coordinates) of the Magnifying Glass.

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_SetMagGlassOwnerDrawCallback.)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 that is set by calling the L_SetMagGlassOwnerDrawCallback function.

If a user-defined callback function matching this prototype is set by calling L_SetMagGlassOwnerDrawCallback, then after L_StartMagGlass is called and the Magnifying Glass paints itself to the DC, but before the Magnifying Glass is displayed on the screen, the user can change what is in the DC, through this user-defined callback function. This allows the user to provide custom rendering of the Magnifying Glass, within the Magnifying Glasss display area. For example, this feature lets you render magnified annotations, which may be overlaid on the currently displayed image, or just simply override what is currently in the Magnifying Glass display area.

To discontinue using this callback function to render the Magnifying Glass, call L_SetMagGlassOwnerDrawCallback with the pfnCallback parameter set to NULL.

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