Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.11.1
LEADTOOLS Raster Imaging C DLL Help

MAGGLASSOWNERDRAWCALLBACK Callback Function

Show in webframe

#include "l_bitmap.h"

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

L_HWND hWnd;

/* handle to a window */

L_HDC hMemDC;

/* memory DC for the Magnifying Glass */

L_INT nXPos;

/* x coordinate of the position of the Magnifying Glass */

L_INT nYPos;

/* y coordinate of the position of the Magnifying Glass */

L_RECT* pMagGlass;

/* bounding rectangle of the Magnifying Glass */

L_VOID* pUserData;

/* pointer to additional parameters */

Provides additional, user-defined Magnifying Glass painting.

Parameter

Description

hWnd

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

hMemDC

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

nXPos

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

nYPos

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

pMagGlass

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

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.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

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

LTDIS

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

L_StartMagGlass, L_StopMagGlass, L_UpdateMagGlass, L_SetMagGlassOwnerDrawCallback, L_CreateZoomView, L_GetZoomViewProps, L_UpdateZoomView, L_DestroyZoomView, L_GetZoomViewsCount, L_WindowHasZoomView, ZOOMVIEWPROPS

Topics:

Using the Magnifying Glass

 

Raster Image Functions: Displaying Images

 

Using the Zoom View

Example

For an example, refer to L_SetMagGlassOwnerDrawCallback.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.