quote:
Originally posted by Mattike
Try:
code:
<Position Left="5" Top="40" Width="70" Height="218"/>
<Units>SizePixels</Units>
</Position>
This will keep the Left and Top values in dialog units (1 unit = 1.5 pixels), but will interpret the Width and Height values as pixels. Eventually, you can use AllPixels instead of SizePixels to have Left and Top also in pixels. It's easier for me to work that way as it lets me perfectly position a control or element.
will work perfect on most default desktops. But people with different display settings like DPI stuff and all that other mambo jambo will see screwed up dialogs (well not really screwed up, but not the stuff you intended anyways)...
In short: 1 dialog unit isn't always 1.5 pixel. So better use dialog units...
(^^ what others tell me todo, personally I would use pixels too though especially since any graphical content you use is defined in pixels and thus to align something perfectly to that you need to use pixels too.... But Patchou and others would probably shake their heads at this and tell me to use dialog units and make the dialogs with graphics in such a way that they will always look 'aligned', aka don't use a graphic as the base to align and design controls or windows, only use them as 'touch-ups')