C
Cristian Udrea
Guest
I have a dialog with multiple drop down combo boxes and 2 of them are custom drawn ones.
We're transitioning to high DPI support and I need to make the custom combo boxes have proper heights throughout the app.
What I need right now is how to calculate the default padding around the item of a combo box.
Back in the days of 96 DPI a few pixels off were unnoticeable but as Win 8.1 & 10 support scaling those 1-2 px differences become an issue with higher scaling.
I've hacked around it by creating an empty ComboBox and using GetClientRect and GetItemHeight(-1) to calculate the height padding, which I then cache to a variable, but this isn't really a good solution.
Continue reading...
We're transitioning to high DPI support and I need to make the custom combo boxes have proper heights throughout the app.
What I need right now is how to calculate the default padding around the item of a combo box.
Back in the days of 96 DPI a few pixels off were unnoticeable but as Win 8.1 & 10 support scaling those 1-2 px differences become an issue with higher scaling.
I've hacked around it by creating an empty ComboBox and using GetClientRect and GetItemHeight(-1) to calculate the height padding, which I then cache to a variable, but this isn't really a good solution.
Continue reading...