MagSetImageScalingCallback function

Note  The MagSetImageScalingCallback function is deprecated in Windows 7 and later, and should not be used in new applications. There is no alternate functionality.
 

Sets the callback function for external image filtering and scaling.

Syntax


BOOL MagSetImageScalingCallback(
  _In_ HWND                    hwnd,
  _In_ MagImageScalingCallback callback
);

Parameters

hwnd [in]

Type: HWND

The handle of the magnification window.

callback [in]

Type: MagImageScalingCallback

The callback function, or NULL to remove a callback that was previously set.

Return value

Type: BOOL

Returns TRUE if successful, or FALSE otherwise.

Remarks

This function requires Windows Display Driver Model (WDDM)-capable video cards.

This function works only when Desktop Window Manager (DWM) is off.

This callback mechanism enables custom image filtering and scaling mechanisms. Filtering might include bilinear, trilinear, bicubic, and flat. The mechanism also enables edge detection and enhancement.

The only transform that can be performed within the callback is scaling. Rotations and skews that may compose the arbitrary transform passed to the MagSetWindowTransform function are performed after the callback function returns.

The specified function is called by the magnification engine for all rasterized Windows Graphics Device Interface (GDI) bitmaps before they are composited.

After the callback function returns, the bitmap in video memory can have one of the following size states:

  • Unscaled. The returned bitmap is the same size as the bitmap passed by the caller. The magnification engine does the scaling by the transform specified in the MagSetWindowTransform function.
  • Scaled. The returned bitmap is scaled by the transform specified in MagSetWindowTransform.

If no callback is registered, the magnification engine scales bitmaps by the transform specified in MagSetWindowTransform.

Windows Presentation Foundation (WPF) bitmaps can be scaled automatically using flat, bilinear, bicubic filtering and consequently do not use this callback mechanism.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Magnification.h

Library

Magnification.lib

DLL

Magnification.dll

See also

MagGetImageScalingCallback
MagSetImageScalingCallback

 

 

Community Additions

ADD
Show: