MagGetInputTransform function (magnification.h)
Retrieves the current input transformation for pen and touch input, represented as a source rectangle and a destination rectangle.
Syntax
BOOL MagGetInputTransform(
[out] BOOL *pfEnabled,
[out] LPRECT pRectSource,
[out] LPRECT pRectDest
);
Parameters
[out] pfEnabled
Type: BOOL*
TRUE if input translation is enabled, or FALSE if not.
[out] pRectSource
Type: LPRECT
The source rectangle, in unmagnified screen coordinates, that defines the area of the screen that is magnified.
[out] pRectDest
Type: LPRECT
The destination rectangle, in screen coordinates, that defines the area of the screen where the magnified screen content is displayed. Pen and touch input in this rectangle is mapped to the source rectangle.
Return value
Type: BOOL
Returns TRUE if successful, or FALSE otherwise.
Remarks
The input transformation maps the coordinate space of the magnified screen content to the actual (unmagnified) screen coordinate space. This enables the system to pass touch and pen input that is entered in magnified screen content, to the correct UI element on the screen. For example, without input transformation, input is passed to the element located at the unmagnified screen coordinates, not to the item that appears in the magnified screen content.
Examples
The following example retrieves the current input translation settings.
// Description:
// Retrieves the current input transform.
//
BOOL GetInputTranform()
{
BOOL fInputTransformEnabled;
RECT rcSource;
RECT rcTarget;
BOOL fResult = MagGetInputTransform(&fInputTransformEnabled,
&rcSource, &rcTarget);
if (fResult)
{
//
// Do something with the input transform data.
//
}
return fResult;
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | magnification.h |
Library | Magnification.lib |
DLL | Magnification.dll |