MagGetInputTransform function

Retrieves the current input transformation for pen and touch input, represented as a source rectangle and a destination rectangle.

Syntax


BOOL WINAPI MagGetInputTransform(
  _Out_  BOOL *pfEnabled,
  _Out_  LPRECT prcSource,
  _Out_  LPRECT prcDest
);

Parameters

pfEnabled [out]

Type: BOOL*

TRUE if input translation is enabled, or FALSE if not.

prcSource [out]

Type: LPRECT

The source rectangle, in unmagnified screen coordinates, that defines the area of the screen that is magnified.

prcDest [out]

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

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Magnification.h

Library

Magnification.lib

DLL

Magnification.dll

See also

MagSetInputTransform

 

 

Community Additions

ADD
Show:
© 2014 Microsoft