PAINTCALLBACK_SETVIEWPORTORGEX Function

Summary

This is the callback that replaces the SetViewportOrgEx GDI function.

Syntax

#include "l_bitmap.h"

L_BOOL pEXT_CALLBACK YourFunction(pDisplay, nX, nY, lpPoint, pUserData)

Parameters

L_VOID *pDisplay

Handle of the device context passed to the paint function.

L_INT nX

Specifies the x-coordinate, in device units, of the new viewport origin.

L_INT nY

Specifies the y-coordinate, in device units, of the new viewport origin.

LPPOINT lpPoint

Pointer to a POINT structure that receives the previous viewport origin, in device coordinates. If lpPoint is NULL, this parameter is not used.

L_VOID *pUserData

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 the PAINTCALLBACKDATA structure.)

Returns

The return values are the same as the return values for the corresponding GDI function.

Comments

The internal display engine calls your callback function if you override the corresponding GDI function in the PAINTCALLBACKDATA structure.

pDisplay is the pDisplay member from the PAINTCALLBACKDATA structure that you passed to the paint function. The default callbacks expect it to be a HDC handle. But, if you override all the paint callbacks, it can be a pointer of any type you want.

Please see the Microsoft documentation for the values you are expected to return and for the meaning of the parameters before pUserData.

Required DLLs and Libraries

Example

For an example, refer to L_PaintDCCallback.

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

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.