News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Sizes of dialogs

Started by lamer, June 02, 2005, 05:32:04 PM

Previous topic - Next topic

lamer

Hi, Ketil!
I use RadASM on two computers: at home and at  :wink
They have different displays and, accordingly, different resolutions. While moving from one to another my dialogs changes dramatically - I guess this is because you store the sizes in pixels in .dlg files. So each time the .rc files changes accordingly - 200 and 300 dialog units on the one computer turn into 500 and 700 (approximately) on another.
May be it is not unreasonable - to store the sizes in dialog untis, I mean in .dlg file, but still keep them in pixels for visual construction in designer?

QvasiModo

I'm not sure if this helps, but I can tell you that the size in pixels of a dialog box unit may change on different computers.

Strictly speaking, DBUs are proportional to the dialog box font's size and aspect. If you change the dialog box font (or switch Windows to "large fonts" mode) you'll see the dialog boxes change their size and proportions too.

lamer

Quote from: QvasiModo on June 02, 2005, 07:21:17 PM
I can tell you that the size in pixels of a dialog box unit may change on different computers.
That's exactly what I've tried to say :bg
But does storing sizes in DBU instead of pixels will preserve proportions?

QvasiModo

Yes, DBUs keep the right proportions despite of the font used, whereas pixels do not (precisely because the pixel size of DBUs may vary). That's why the WinAPI uses DBUs to begin with. :)