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

Cell size not right on high DPI device #446

Closed
xuqiang1015 opened this issue Nov 25, 2021 · 3 comments
Closed

Cell size not right on high DPI device #446

xuqiang1015 opened this issue Nov 25, 2021 · 3 comments

Comments

@xuqiang1015
Copy link

ReoGrid is great Control, thanks to everybody who works on it!

Now I tried to use ReoGrid(WinForm version) in my MFC program.

My screen DPI is 200%, cell height is 20 by default, so cell height should be 40 pixcel.

It works fine when I use ReoGrid in winform.

But when I intergate ReoGrid into MFC, cell height turns to be 20 pixcel.

I didn't find the right solution for it.

Anyone konw how to solve it ? Thanks for you help!

My test code is here.

Which edition of ReoGrid is targeted

  • Windows Form
@xuqiang1015
Copy link
Author

I found the reason. ReoGrid does not surpport DPI Aware yet.

I've modified my test code, make the Winform project DPI Aware. Now cells in WinForm project is not right too.

When project is DPI Unaware, cell and font have been scaled by system, so the size is right, but turns into blurry.

These are images to compare under DPI Aware and DPI Unaware mod:

DPI Aware:

DPI 200 aware

DPI Unaware:

DPI 200 Unaware

Origin Images are here :
DPI Aware
DPI Unaware

@xuqiang1015 xuqiang1015 changed the title Cell size not right on high DPI device after intergrated with MFC Cell size not right on high DPI device Dec 1, 2021
@xuqiang1015
Copy link
Author

fixed in pull request

@jingwood
Copy link
Member

Thank you very much!

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

No branches or pull requests

2 participants