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

dpi aware v2?

<< < (2/2)

ollydbg:

--- Quote from: Pecan on March 29, 2023, 11:17:04 pm ---My experience is that this problem goes away when the Editor/OtherEditorSettings/Technology is set to DirectWrite.

--- End quote ---
Hi, Pecan, thanks. Yes, enable DirectWrite can solve calltip font size issue, but the DirectWrite cause other issue. The main problem is that it will crash if you use C::B from remote desktop. I have report this crash issue long time ago(either in wxWidgets' github or in our C::B forum), it was not fixed yet. Not sure how complex to handle it correctly, the main point is the Direct Draw surface should be cleared once an editor get closed.

My guess is that the font size to window size calculation is wrong here in non-DirectWrite mode for constructing the CC's tip-window.

ollydbg:

--- Quote from: PB on March 29, 2023, 08:09:03 pm ---IME, moving a window between monitors with different DPI does generate wxDPIChangedEvent, as long as the application is marked as PMv2 aware.

--- End quote ---

Hi, PB, thanks. I'm testing with the wxWidgets' sample program named "display". I'm not fully understand the logic, and see something unexpected. I will report here or in the wxWidgets' forum.

EDIT:

I have post a question about how FromDIP works in wxWidgets forum, see here: How does the FromDIP function work under different DPI scaling?

Pecan:
Is any of this true (I'm always skeptical of ChatGPT), and if so, is it of any use to us?

ollydbg:

--- Quote from: Pecan on March 30, 2023, 07:15:41 am ---Is any of this true (I'm always skeptical of ChatGPT), and if so, is it of any use to us?

--- End quote ---
For my experience: Sometimes, ChatGPT can give you a sample wx code. Most of the time, the code can't be built, it has many build errors.

If you follow the discussion in this wx forum thread: How does the FromDIP function work under different DPI scaling?, I think the simple way to do this DPI change is just call the "ResetMode()" of the wxDisplay, so that everything get layout again.

I'm not sure my guess is correct, but when I search for the keyword "ResetMode", I don't see much usage. Maybe, I will ask this in wx-user maillist.

EDIT:

I post a question on wx-user maillist here: What is the correct way to response to the wxEVT_DPI_CHANGED event?

Navigation

[0] Message Index

[*] Previous page

Go to full version