Sets the callback function for external image filtering and scaling.
BOOL MagSetImageScalingCallback( HWND hwnd, MagImageScalingCallback callback );
The handle of the magnification window.
The callback function, or NULL to remove a callback that was previously set.
Returns TRUE if successful, or FALSE otherwise.
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.
Windows Presentation Foundation (WPF) bitmaps can be scaled automatically using flat, bilinear, bicubic filtering and consequently do not use this callback mechanism.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|