PAINTCALLBACK_ISCOMPATIBLEDC Function

#include "l_bitmap.h"

L_BOOL pEXT_CALLBACK YourFunction(pDisplay, pBitmap, pUserData)

L_VOID *pDisplay;

device context handle

pBITMAPHANDLE pBitmap;

pointer to the bitmap handle

L_VOID *pUserData;

pointer to additional data

This callback is used to verify whether the device context and the bitmap handle are compatible with your callbacks.

Parameter

Description

pDisplay

Handle of the device context passed to the paint function.

pBitmap

Pointer to the bitmap handle structure we are checking against.

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

TRUE

The device context and the bitmap are compatible.

FALSE

The device context and the bitmap are NOT compatible.

Comments

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.

This callback is expected to check both the device context and the bitmap handle and determine whether they are compatible with your callback. If the function returns TRUE, the paint will continue with the current callbacks. If the function returns FALSE, all the other callbacks are ignored and the paint will use the default GDI functions for painting. In this case, the pDisplay member of the PAINTCALLBACKDATA structure is expected to the handle of a valid device context handle. If pDisplay is not a valid device context handle, the paint function will fail.

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

Example

For an example, refer to L_PaintDCCallback.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C API Help