5 ms·
Nope, you get the pleasure of implementing dpi support yourself. https://building.enlyze.com/posts/writing-win32-apps-like-its-2020-part-3/ https://building.en
by jansommer 3y ago
Nope, you get the pleasure of implementing dpi support yourself.
https://building.enlyze.com/posts/writing-win32-apps-like-its-2020-part-3/ https://building.enlyze.com/posts/writing-win32-apps-like-it...
- dataflow 3y agoThanks for the link. Glancing at it, I still don't see where there's a need to patch system controls for high DPI support, though. The closest thing I see there is for changing their fonts, but that seems different from patching them (no superclassing that I can see, etc.). Moreover, it's for dynamic DPI support (i.e. supporting DPI changes), not high DPI support. Is that what you were referring to?
- jansommer 3y agoI think you should try a plain win32 program on a high dpi and just see for yourself.
- dataflow 3y agoThat's not exactly a... helpful answer. In fact I already have a Win32 (dialog-based, if that makes any difference) one that looks just fine on 200% DPI on Windows 10. All it required handling was scaling the obvious stuff (icon sizes, overall window size, etc.) and the manifest, nothing that required superclassing or otherwise patching common controls. i.e. I just haven't run into the problem you're mentioning. I'm kind of confused why you linked to an article that doesn't support your claim either. Hence why I'm asking you instead of spending hours trying to reproduce what you're saying.
- jansommer 3y agoI don't know why you assume I'm here to give you helpful answers, but I'll bite. Try a combo box on high dpi. The arrow button gets a lot thinner than on 96 dpi.
- dataflow 3y agoI didn't assume you'd give a helpful answer, but I didn't expect you to give that kind of an answer, either. You're always welcome not to respond if this is taking too much of your time. I figured maybe at least one of us would learn something about high DPI issues, hence why I engaged. And I did just try what you said and the combo box fine to me: https://imgur.com/a/Mb83tPj https://imgur.com/a/Mb83tPj
- jansommer 3y agoThat is not the default Win32 combobox. I don't know what you're using, but it's not the plain c api.
- binjooou 3y agoThat is the default combobox if you enable "visual styles" (which you should do on Windows XP and above)
- jansommer 3y agobinjooou: The whole point for me when using win32 is to use the default look, since it's a better ui compared to todays flat design. But I acknowledge that there could be a little less dpi work associated with enabling visual styles.
- dataflow 3y agoThis is most definitely the default combo box. In fact, I just tried the version without visual styles as well, and that one looks fine under high DPI too (see screenshot). At this point I'm very confused what you are doing. Perhaps you're not on Windows 10?
- GoblinSlayer 3y agoWhen you load a dialog from resource, windows scales it proportionally to specified font size (DS_FONT style).