Windows Control size
- Posted by Pete Stoner <stoner.pete at gmail.com> Jun 30, 2005
- 562 views
Hi All I have programs written using Win32lib, all the controls are sized to look good on my 96dpi screen, when I run them on my laptop which is set to 120dpi the text becomes too large for its container (buttons, text boxes etc). I had a peek at some commercial programs using WinSpy and the sizes of all the containers (including the window itself) have different sizes on 96 and 120dpi. I could knock up a routine to check if the font is too large for its container and reduce the size of the font (or increase the size of its container but then I'll have to also manage the position of any nearby containers), I wonder if there is a better way... My question for you experianced programmers (which I am not.. ) is how is this managed on commercial programs? is it automatically resized or are there differnt sizes coded depending on the DPI? if it is the second option how is this done for the possible multitude of other dpi's? BTW, I also have 50 GMail invites to use up now, so if anyone wants one... Regards Pete