MagSetImageScalingCallback function (magnification.h)
Sets the callback function for external image filtering and scaling.
Syntax
BOOL MagSetImageScalingCallback(
[in] HWND hwnd,
[in] MagImageScalingCallback callback
);
Parameters
[in] hwnd
Type: HWND
The handle of the magnification window.
[in] callback
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.
Windows Presentation Foundation (WPF) bitmaps can be scaled automatically using flat, bilinear, bicubic filtering and consequently do not use this callback mechanism.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | magnification.h |
Library | Magnification.lib |
DLL | Magnification.dll |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for