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

Fix: Add fallback for missing DPI-related Win32 APIs #629

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nilaoda
Copy link

@nilaoda nilaoda commented Dec 15, 2024

image

fix #628

@nilaoda
Copy link
Author

nilaoda commented Dec 15, 2024

@amwx When you have a moment, I’d appreciate your review and any feedback you might have. Thanks a lot!

{
return GetSystemMetricsForDpi(nIndex, dpi);
}
catch (EntryPointNotFoundException)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to use a Windows version check rather than Try/Catch. Take a look at the ApplyTheme method further below, as I already have a helper class for this.

Copy link
Author

@nilaoda nilaoda Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amwx I have used the helper class you provided for the check. However, I found an issue with the function: it returns false instead of true when the system version exactly matches the major, minor, and build.

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

Successfully merging this pull request may close these issues.

Application Fails to Launch on Older Windows 10 Versions Due to Unsupported API
2 participants