Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dpi crash on launch #484

Closed
sebou77 opened this issue Oct 11, 2023 · 2 comments
Closed

Dpi crash on launch #484

sebou77 opened this issue Oct 11, 2023 · 2 comments

Comments

@sebou77
Copy link

sebou77 commented Oct 11, 2023

Hi, here's my problem i code on delphi 10.3, with 4k screen (150% on windows scale). When i launch my app without cef no problem, and when i add :

CreateGlobalCEFApp;
if GlobalCEFApp.StartMainProcess then

my app juste become crazy on 150% windows scale (TImage on alClient take 25% of size, popupmenu appear at random place, etc..), it's keep working on 100% windows scale. Any idea ?

@salvadordf
Copy link
Owner

Hi,

CEF had some issues with the DPI awareness setting as you can see here.

I upgraded my Delphi installation to 11.3 and I can't test the workarounds suggested in that link with Delphi 10.3.

Open the project settings and click on the "Application -> Manifest" section. Try setting "DPI Awareness" to "None".

Other DPI Awareness values might work too but I can't test them.

Please, post this information in our forum if this workaround doesn't work for your application.

@salvadordf
Copy link
Owner

Adding a manifest with some value for DPI awareness or calling SetProcessDpiAwareness() with the value PROCESS_DPI_UNAWARE before loading the CEF works.
See this question in stackoverflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants