Page 1 of 1

Dialog, Button PIXEL

Posted: Wed Oct 10, 2007 9:52 pm
by Otto
If I use PIXEL then the Pixels from the Button count double i.e.
@ 125, 100 BTNBMP SIZE BTN_WIDTH, BTN_HEIGHT ;
FILENAME "..\bitmaps\arrow.bmp" OF oDlg
Is shown on 250, 200.

What is the right syntax?

PS:
Screen Ruler (free) is a useful tool to measure the coordinates:
http://delphi.about.com/library/weekly/aa080205a.htm

Posted: Wed Oct 10, 2007 11:59 pm
by James Bott
Otto,

For some strange reason the units used for dialogs are not the same as those for windows (you may thank Microsoft for this). I guess this means they are really not pixels. Google "dialog units" if you interested in more info.

I find that if you divide the dialog units by 2.05 they are about the same as they would be for a window. You can do something like this to make it easier to read since you can still see the pixel equivalent values.

@ 125/2.05, 100/2.05 BTNBMP...PIXEL

James