none
High DPI Issue in Windows Printer Driver RRS feed

  • Question

  • We are facing High DPI display issue in our Windows V3 Printer Driver.
    The issue is that, the custom plug-in (DLL) where we are displaying the properties is not getting scaled-up compared to the other tabs of printing preferences. 
    This custom plug-in (DLL) where we are displaying the properties is developed using wxWidgets (Version 3.1) and all necesssary wxWidgets libraries are statically linked with it.
    We have tried the following things to get it working:, but of no use.
    1. Built all modules of our driver with "Per Monitor High DPI Aware" in Visual Studio->Properties->Manifest Tool->Input and Output->DPI Awareness
    2. Referred the below Microsoft links:
    https://docs.microsoft.com/en-us/windows/desktop/api/shellscalingapi/nf-shellscalingapi-setprocessdpiawareness 
    https://msdn.microsoft.com/en-us/C9488338-D863-45DF-B5CB-7ED9B869A5E2 
    https://docs.microsoft.com/en-us/windows/desktop/hidpi/high-dpi-desktop-application-development-on-windows 

    Used HRESULT SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value); with PROCESS_PER_MONITOR_DPI_AWARE, BOOL SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT value); with DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2.

    But still we were unable to get the custom plug-in (DLL) where we are displaying the properties displayed correctly (not scaled enough like other tabs).

    Any recommendation to address this is really appreciable.

    Monday, October 29, 2018 9:48 AM

All replies

  • If your dialog is appearing too small, then it is NOT "High DPI Aware", and you should not be setting the flags.  When you advertise "High DPI Aware", it says that you will scale yourself to match the DPI of the monitor.

    Are the width and height of the property window correct?  If you're using sizers, then wxWidgets should be adjusting the sizes automatically.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Tuesday, October 30, 2018 9:18 PM