Search code examples
c++mfcrdp

Scaling RDP ActiveX Larger in MFC Application


I have an MFC (C++) application that wraps the MSTSC ActiveX. I'm trying to figure out how to scale the window that the ActiveX creates larger. The MS Remote Desktop Connection app has a relatively new zoom feature that is basically what I'm looking for, I just can't seem to figure out how they implemented it.

If I attempt to scale all the child windows that the ActiveX creates I can get the image scaled larger, but the input window doesn't function properly. Basically input behaves like the window hasn't been resized (checked that it did get resized through Spy++), so all input is off linearly by how much it's scaled and where you click.

Is there a method in the ActiveX that I'm just missing, or another way to scale the input window that handles the mouse input properly?


Solution

  • MsRdpExtendedSettings has a property 'ZoomLevel' that takes a VT_UI4 variant type to specify the desired zoom level. It seems to only be able to be set after the connection is established.

    It would be documented here:

    https://msdn.microsoft.com/en-us/library/jj583804(v=vs.85).aspx