Thursday, July 02, 2009

Windows dialog rc file is using dialog system units

This has never occurred to me before, I have been tweaking win32 API for awhile, but I really never paid much attention with the dimensions as saved in resource files for dialog boxes. Interestingly, the units stored in rc file are not really in pixel but rather in dialog unit. :( My understanding is that this will make the dialog independent of the font size. If user/developer changes the font size, the dialog box will adjust accordingly. Seems like a neat idea but I was dumbfounded at first sight.

It makes my life harder though as I am trying to cross-reference runtime dialog boxes against design time. I was planning to cross ref them using the dimensions but it turns out to be not a good option.

The quest is on...........

Related links:


No comments: