Oct 30, 2014 Windows has had DPI scaling for years, but it has mostly sucked and had bad software support. With the latest Windows 8.1 iteration, is it functionally identical to how Macs use high DPI displays? Content is rendered 1:1 (movies, photos, etc) with the UI interface scaled up to be useable on high resolution displays. Mar 19, 2016 This issue is caused by lack of not being DPI scaling aware of the Remote Desktop Client. If you open a Remote Desktop connection to a server or other computer the native resolution of the computer is used instead of the scaling to 1920×1080, so you’ll get very small icons etc. Some other blogs mention to fix the issue with using Remote Desktop Connection Manager. Mar 19, 2020 Remote desktop scaling Using my Surface Pro4 to remote desktop to my work computer the screen is so small that its not usable. I've tried some of the solutions when Ive googled the problem but none have been successful and certainly not recent. If you already have the client, you can check for updates to ensure you have the latest version. In the beta client, click Microsoft Remote Desktop Beta at the top, and then click Check for updates. Add a Remote Desktop connection. To create a remote desktop connection: In the Connection Center, click +, and then click Desktop. Mar 03, 2020 Windows 10: How do I enable DPI scaling for 4K full-screen Remote Desktop? Discus and support How do I enable DPI scaling for 4K full-screen Remote Desktop? In Windows 10 Ask Insider to solve the problem; I'm on a pair of 4K displays. For a very long time, the RDP to my work machine had DPI scaling enabled so that when I connect full-screen across both. Apr 07, 2020 For earlier Windows systems, right-click on the application icon, such as via a shortcut on the desktop, and select Properties. Then, select the Compatibility tab. Under settings, click Change high. Jul 12, 2018 The better solution: Two copies of Remote Desktop Client. One with scaling enabled, the other one without. Let’s create a copy of mstsc.exe (called mstsc2.exe) and disable HiDPI scaling for mstsc2.exe using AppCompatFlags. Both executables can exist in parallel.
- Microsoft Remote Desktop Mac Display Settings
- Microsoft Remote Desktop Mac Dpi Scaling Download
- Microsoft Remote Desktop Mac Os X
- Mac Microsoft Remote Desktop Client
Many computer and display configurations now support high DPI (dots-per-inch) resolutions, and can connect multiple monitors with different sizes and pixel densities. This requires applications to adjust when the user moves the app to a monitor with a different DPI, or changes the zoom level. Applications that don’t support DPI scaling might look fine on low DPI monitors, but will look stretched and blurry when shown on a high DPI monitor.
Office 2016 applications, such as Word and Excel, have been updated to respond to changes in scale factor. However, your Office solution must also respond to changes to draw correctly when the DPI changes. This article describes how Office supports dynamic DPI, and what steps you can take to ensure the best viewing experience for your Office extensibility solution to handle DPI scaling.
DPI scaling symptoms in your solution
Windows applies DPI scaling when an application is moved from one display to another display with a different DPI. This happens in scenarios such as dragging an application to a different monitor or docking your laptop. If your Office solution is adversely affected by DPI scaling, you will see one or more of the following symptoms:
- The windows draw in the wrong location or have incorrect sizing.
- Elements such as buttons and labels appear in the wrong location in your solution’s window.
- Fonts and images appear too small, too large or in the wrong location.
The following types of Office solutions can be affected by DPI scaling:
- VSTO Add-ins
- Custom task panes
- COM Add-ins
- ActiveX controls
- Ribbon extensions
- Ole servers
- Office web add-ins
Windows DPI awareness modes
Throughout this article we’ll refer to the DPI awareness modes that Windows supports. Each DPI awareness mode supports different capabilities, as described in the following table. This is a simplified description of the modes to explain how Office solutions support them. For more information about the DPI awareness modes, see High DPI Desktop Application Development on Windows.
Mode | Description | When DPI changes |
---|---|---|
DPI unaware | Application always renders as if it is on a display with a DPI value of 96. | Application is bitmap stretched to expected size on primary and secondary displays. |
System DPI aware | Application detects the DPI of the primary connected monitor at Windows login but cannot respond to DPI changes. For more information, see the Configure Windows to fix blurry apps section in this article. | Application is bitmap stretched when moved to a new display with a different DPI. |
Per Monitor DPI aware | Application is capable of redrawing itself correctly when the DPI changes. | Windows will send DPI notifications to top-level windows in the application so that it can redraw when the DPI changes. |
Per Monitor v2 | Application is capable of redrawing itself correctly when the DPI changes. | Windows will send DPI notifications to both top-level and child windows so that the application can redraw when the DPI changes. |
How Office supports DPI scaling
The most significant factor in determining how your Office solution can handle DPI scaling is whether your solution is a top-level window, or a child window. The following picture shows a few examples of Office solutions running as top-level or child windows, and which DPI awareness mode they will use on Windows April 2018 Update (1803) and later.
In this image:
- The COM/VSTO top-level window is Per Monitor DPI aware.
- The ActiveX control child window is System DPI aware.
- The Office top-level window is Per Monitor DPI aware.
- The custom task pane child window is System DPI aware.
Managing thread DPI context
When the host Office app starts, its main thread runs in Per Monitor DPI aware context. When your solution code creates threads, or receives calls from Office, you need to manage the thread DPI context.
Creating new threads with the correct DPI context
If your solution creates additional threads, Office will force the threads into Per Monitor DPI aware context. If your code expects a different context, you need to use the SetThreadDpiAwarenessContext function to set the expected thread DPI awareness.
Build a context block for incoming thread calls
Your solution will interact with its host Office app, so you will have incoming calls to your solution from Office such as event callbacks. When Office calls your solution, it has a context block that forces the thread context to be in System DPI Aware context. You must change the thread context to match the DPI awareness of your window. You can implement a similar context block to switch the thread context on incoming calls. Use the SetThreadDpiAwarenessContext function to change the context to match your window context.
Note
Your context block should restore the original DPI thread context before calling other components outside of your solution code.
Managed code context block
The following example code shows how to construct your own context block.
Native code context block
Top-level window management
When Office applications start, a call is made to SetThreadDpiAwarenessContext as DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE. In this context, DPI changes are sent to the HWND of any top-level windows in the process that are running as Per Monitor DPI aware. Top-level windows are the Office application window, and any additional top-level windows created by your solution. When an Office application is moved to a new display, it gets notified so that it can dynamically scale and draw correctly in the DPI of the new display. Your Office solution can create top-level windows that are in any DPI awareness mode. Your top-level windows can also respond to DPI changes by listening to Windows messages for the changes.
If you create child windows that are parented to your top-level window, you can also set them to any DPI awareness mode. However, if you use Per Monitor DPI aware mode, your child windows will not receive DPI change notifications. For more information about Windows DPI awareness modes, see High DPI Desktop Application Development on Windows.
Child window management
When working with ActiveX controls and custom task panes, Office creates the child window for your solution. You can create additional child windows, but you have to be aware of the parent window DPI awareness. Office runs in Per Monitor DPI awareness mode, which means any child windows in your solution will not get DPI change notifications. Only Per Monitor v2 mode supports sending DPI changes to child windows (Office does not support Per Monitor v2). However, for ActiveX controls, there is a workaround. For more information, see the ActiveX controls section later in this article.
Note
If your child window creates a top-level window, you can use any DPI awareness mode for the new top-level window. For more information about managing top-level windows, see the Top-level window management section in this article.
You will see two different DPI modes applied to your child window, depending on which version of Windows 10 Office is running on.
Office DPI behavior on Windows Fall Creators Update (1709)
Because Office apps use Per Monitor awareness mode, your solution’s child windows will also be created in Per Monitor DPI awareness mode. This means Windows expects your solution to update when drawing in a new DPI. Because your window cannot get DPI change notifications, your solution’s UI might be incorrect.
Office DPI behavior on Windows April 2018 Update (1803)
With Windows April 2018 (1803) update and later, The Office DPI hosting behavior uses mixed-mode DPI scaling for some scenarios. This allows System DPI Aware windows to be parented to Office windows set to Per Monitor DPI aware. This helps to ensure improved compatibility when the DPI changes when the windows are bitmap stretched. The windows might still be blurry from the bitmap stretching.
When you create new child windows, be sure they match the DPI awareness of their parent window. You can use the GetWindowdpiAwarenessContext function to get the DPI awareness of the parent window. For more information about DPI awareness consistency, see the “Forced reset of process-wide DPI awareness” section in High DPI Desktop Application Development on Windows.
Note
You can’t rely on the Process DPI Awareness as it might return PROCESS_SYSTEM_DPI_AWARE even when the application main thread DPI awareness context is DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE. Use the GetThreadDpiAwarenessContext function to get the thread DPI awareness context.
Office and Windows DPI compatibility settings
When users encounter add-ins or solutions that are not rendering correctly, some compatibility settings can help correct the problem.
Configure Office to optimize for compatibility
Office has a setting to optimize for compatibility when moving to different DPI scales on different screens. The compatibility mode disables DPI scaling so that everything in Office is bitmap stretched when moved to a display using different DPI scaling.
The compatibility mode forces Office to run in System DPI aware mode. This causes application windows to bitmap stretch and can have a side effect of a blurry appearance. Your Office solution cannot control this setting because the user chooses it. Using the display compatibility mode solves most drawing problems. For more information, see Office support for high definition displays.
Configure Windows to fix blurry apps
Windows 10 (Version 1803) and later has a setting to fix apps so they’re not blurry. This is another setting to try if your solution is not rendering correctly. Your Office solution cannot control this setting because the user chooses it. For more information, see Fix apps that appear blurry in Windows 10.
How to support DPI scaling in your solution
Some solutions can receive and respond to DPI changes. Some have a workaround if they cannot receive notifications. The following table lists the details for each solution type.
Microsoft Remote Desktop Mac Display Settings
Solution Type | Window type | Can respond to DPI scaling | More details |
---|---|---|---|
VSTO Add-in | Top and its descendants | Yes | See VSTO add-in guidance. |
Child parented to Office window | No | See Configure Office to optimize for compatibility. | |
Custom task pane | Top and its descendants | Yes | See top-level window guidance. |
Child parented to Office window | No | See Configure Office to optimize for compatibility. | |
COM Add-in | Top and its descendants | Yes | See COM Add-in guidance. |
Child parented to Office window | No | See Configure Office to optimize for compatibility. | |
ActiveX control | Top and its descendants | Yes | See ActiveX control guidance. |
Child parented to Office window | Yes | ||
Web Add-in | NA | Yes | See Office web add-in guidance. |
Ribbon extension | NA | NA | See Ribbon extension guidance. |
OLE server or client | NA | NA | See OLE server/client guidance. |
VSTO add-in
If your VSTO add-in creates child windows that are parented to any Office windows, be sure they match the DPI awareness of their parent window. You can use the GetWindowdpiAwarenessContext function to get the DPI awareness of the parent window. Your child windows will not get any DPI change notifications. If your solution is not rendering correctly, users will need to put Office into compatibility mode.
For any top-level windows your VSTO add-in creates, you can set them to any DPI awareness mode. The following sample code shows how to set up the desired DPI awareness, and how to respond to DPI changes. You will also need to adjust your app.config, as described in the High DPI support in Windows Forms article.
Custom task panes
A custom task pane is created as a child window by Office. When running on Windows Fall Creators Update (1709), your custom task pane will run using the same DPI awareness mode as Office. When running on Windows April 2018 Update (1803) and later, your custom task pane will run using System DPI awareness mode.
Because custom task panes are child windows, they cannot receive DPI notifications. If they are drawing incorrectly, the user will need to use Office DPI compatibility mode.If your custom task pane creates top-level windows, those windows can run in any DPI awareness mode and receive DPI change notifications. For more information, see the Top-level window management section in this article.
COM add-ins
COM add-ins that create top-level windows can receive DPI notifications. You should create a context block to set the thread to the DPI awareness that you want for your window, then create your window. There’s a lot to handling the DPI notifications correctly, so be sure to read High DPI Desktop Application Development on Windows for more details.
The WM_DPICHANGED message is sent when the DPI for a window has changed. In unmanaged code, this message is handled by the Window Procedure for the HWND. Sample DPI change handler code can be found in the WM_DPICHANGED article.
COM add-ins that show child windows that are parented to a window in Office cannot receive DPI notifications. If they are drawing incorrectly, the user will need to use Office DPI compatibility mode.
ActiveX controls
How to support DPI scaling in ActiveX controls depends on whether the control is windowed or windowless.
Windowed ActiveX controls
Windowed ActiveX controls receive a WM_SIZE message each time the control is resized. When this event is triggered, the event handler code can call the GetDpiForWindow function using the HWND of the control to get the DPI, calculate the scale factor differences, and adjust as needed.
The following example enables an MFC-based ActiveX control to respond to the OnSize event.
Windowless ActiveX controls
Windowless ActiveX controls are not guaranteed have an HWND. When an ActiveX control is inserted onto a document canvas, it is put into design mode. In Office applications, the hosting container will return 0 for the call to hDC->GetWindow() in the ::OnDraw event when the control is in design mode. A reliable DPI cannot be retrieved in this case.
However, when the control is in runtime mode, Office will return the HWND where the control is to be drawn. In this case, the control developer can call GetDpiForWindow and get the current DPI and scale fonts, controls, and so on.
Custom ribbon extensibility
Any callbacks from Office for custom ribbon controls will be in a DPI thread awareness of System DPI aware. If your solution is expecting a different DPI thread awareness, you should implement a context block to set the thread awareness as expected. For more information, see Build a context block.
OLE clients and servers
Microsoft Remote Desktop Mac Dpi Scaling Download
When an OLE server is hosted within an OLE client container, you currently can’t provide current or supported DPI information. This can cause problems because some combinations of parent to child window mixed modes are not supported by the current Windows architecture. If Word or Excel detect that there are multiple monitors with different DPI scales, they will not support in-place activation. Your OLE server will activate out-of-place. If you are experiencing issues with OLE server interactions, the user will need to use Office DPI compatibility mode.
Office Web Add-ins
Office Add-ins built using the Office JavaScript API run inside a browser control. You can handle DPI scaling using the same techniques used in any web app design. Many online resources are available to help design a web page for high resolution screens.
Verify that your solution supports DPI scaling
After you have updated your application to support DPI scaling, you should validate your changes in a mixed-DPI environment. Validate that your UI code responds properly to DPI changes when your solution’s windows are moved from one display to another that has different DPI values. For more information about DPI scaling testing techniques, see High DPI Desktop Application Development on Windows.
You might also find these additional techniques helpful:
- With a laptop, you can set the primary monitor to an external monitor, then undock the laptop. This will force the primary monitor to change to the laptop display.
- Use the open source WinSpy++ tool to help debug. You can use it to see the DPI awareness setting of any window.
- You can use remote desktop to test multiple monitors on a remote computer by selecting Use all my monitors for the remote session on the Display tab, as shown in the following screenshot.
See also
Articles
Microsoft Remote Desktop Mac Os X
- Developing a Per-Monitor DPI-Aware WPF Application provides a general overview and guide for writing Win32 desktop applications. Many of the same techniques described in this article will apply to Office extensibility solutions.
- Mixed-Mode DPI Scaling and DPI-aware APIs has a list of APIs related to DPI.
- Developer Guide - Per Monitor DPI - WPF Preview covers the WPF app development guide for building DPI-aware WPF apps.
- Office support for high definition displays provides information about how a user can set Office to optimize for compatibility if your Office solution is not supported properly when the DPI changes.
- Display Scaling changes for the Windows 10 Anniversary Update is a blog post that covers changes introduce with the Windows 10 Anniversary update.
- DPI_AWARENESS_CONTEXT handle has programming details on the DPI_AWARENESS_CONTEXT values and definitions.
- High DPI Desktop Application Development on Windows includes information about testing in the Testing Your Changes section.