Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

dpi aware v2?

(1/2) > >>

ollydbg:
In the src target, we have a src\resources\resources.rc, which contains such code:


--- Code: ---  #if defined(WX_CPU_AMD64)
    #if defined(cbDPI_AWARE_ON)
        wxMANIFEST_ID RT_MANIFEST "amd64_dpi_aware_on.manifest"
        #warning Manifest: amd64_dpi_aware_on.manifest
    #else
        wxMANIFEST_ID RT_MANIFEST "amd64.manifest"
        #warning Manifest: amd64.manifest
    #endif

--- End code ---

When in a win 10 PC, I have first monitor which is DPI125%, and a second monitor has DPI 100%. Now if I start C::B in the first monitor, and drag the window to the second monitor, the main window get blurring, so do we need dpi aware v2?

If I under correctly, the v2 version should have dpi for each monitor, see document here:

High DPI Desktop Application Development on Windows - Win32 apps | Microsoft Learn

Any ideas?

Miguel Gimenez:
For C::B to react to the DPI change it should handle the wxDPIChangedEvent, new in wx3.1.3 and, AFAIK it is not handled currently. Also, it is only generated on Windows 10 1703+

In the link there is more information about DPI handling and manifests.

EDIT: Dragging the window will not generate this event, we could generate it programatically.

ollydbg:

--- Quote from: Miguel Gimenez on March 28, 2023, 05:47:59 pm ---For C::B to react to the DPI change it should handle the wxDPIChangedEvent, new in wx3.1.3 and, AFAIK it is not handled currently. Also, it is only generated on Windows 10 1703+

In the link there is more information about DPI handling and manifests.

EDIT: Dragging the window will not generate this event, we could generate it programatically.

--- End quote ---

Thanks, I believe it is a bit hard to fix such issue.

One issue I see from the cc_manager is that the tip window shown on the screen has the different font size as the editor's font.

Here is the screen shot of a PC running Win11 with DPI setting as 150%. It also happens on other Win10 with DPI setting of 125%.

 

PB:

--- Quote from: Miguel Gimenez on March 28, 2023, 05:47:59 pm ---For C::B to react to the DPI change it should handle the wxDPIChangedEvent, new in wx3.1.3 and, AFAIK it is not handled currently. Also, it is only generated on Windows 10 1703+

EDIT: Dragging the window will not generate this event, we could generate it programatically.

--- End quote ---

IME, moving a window between monitors with different DPI does generate wxDPIChangedEvent, as long as the application is marked as PMv2 aware.

Pecan:

--- Quote from: ollydbg on March 29, 2023, 03:30:31 am ---
--- Quote from: Miguel Gimenez on March 28, 2023, 05:47:59 pm ---For C::B to react to the DPI change it should handle the wxDPIChangedEvent, new in wx3.1.3 and, AFAIK it is not handled currently. Also, it is only generated on Windows 10 1703+

In the link there is more information about DPI handling and manifests.

EDIT: Dragging the window will not generate this event, we could generate it programatically.

--- End quote ---

Thanks, I believe it is a bit hard to fix such issue.

One issue I see from the cc_manager is that the tip window shown on the screen has the different font size as the editor's font.

Here is the screen shot of a PC running Win11 with DPI setting as 150%. It also happens on other Win10 with DPI setting of 125%.

--- End quote ---

My experience is that this problem goes away when the Editor/OtherEditorSettings/Technology is set to DirectWrite.

Navigation

[0] Message Index

[#] Next page

Go to full version