Thanks guys, this does appear to be the case. I used the following code to
convert from Installer Units to pixels...

            NONCLIENTMETRICS metrics = new NONCLIENTMETRICS();
            metrics.cbSize = Marshal.SizeOf(metrics);

            SystemParametersInfo(SPI.SPI_GETICONTITLELOGFONT, 0, ref
metrics, 0);
            Font f = Font.FromLogFont(metrics.lfCaptionFont);

            return (int)Math.Round((float)e * ((float)f.Height /
(float)12));

And this appears to put everything in proportion. However, the size of the
form itself appears to be 16 pixels too small for width, and 32 pixels too
small for height.
I can just add these pixel values to the defined Dialog dimensions and get
the correct result, however I don’t know that this is _correct_ on all
systems...

Can anyone think of why the form needs to be enlarged by this amount (Im
hoping its not non-client-area... jeeze that would be a can of worms to get
into)?

Thanks
 - Adam Langley


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of DEÁK JAHN,
Gábor
Sent: Thursday, 22 November 2007 1:39 a.m.
To: WiX-devs
Subject: [WiX-devs] relationship between control dimensions in Wix XML, and
actual dimensions

On Tue, 20 Nov 2007 20:54:28 -0800, Bob Arnson wrote:

Bob,

> Dimensions in MSI UI aren't by pixel but by "installer units." It's 
> not documented, but apparently MSI uses the system message box font to 
> determine how to adjust/resize controls (visible in the 
> TextHeightCorrection property in a verbose log).

And very rightly, I have to add. He who authoreth in pixels would steal
sheep; both on the desktop and on the web. A day-to-day experience for us,
users, running at a higher resolution (1600 x 1200 @ 120 dpi in my case).

Bye,
   Gabor

-------------------------------------------------------------------
DEAK JAHN, Gabor -- Budapest, Hungary
E-mail: [EMAIL PROTECTED]



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to