Setup.exe: Font issue

Benjamin Riefenstahl
Thu May 22 16:18:00 GMT 2003

Hi Gary,

Thanks for getting back to me.

"Gary R. Van Sickle" <> writes:
> I don't quite follow.  MS Sans Serif claims to be TT, is Shell Dlg
> bitmap or something?  And how would that be affected by dpi anyway?
> Are dialog units actually determined from the dialog's title font?
> (That would not surprise me in the least BTW ;-))

Actually, "MS Sans Serif" is a bitmapped font on my system (with a
limited selection of actual sizes, of course) and "MS Shell Dlg" is an
alias for "Microsoft Sans Serif" here which is a TTF font.

Anyway, Microsoft and the user can create all kinds of confusion in
this area, font mapping is implemented in Windows on several levels
(historical reasons).  Any tweaker tool or new Windows version can use
these abilities at will.

And yes, dialog units are determined by the base font of a dialog
(which is separate from the title font, though).  You probably know
this already, but just to recapitulate: Positioning and size of a
dialog and of the controls on the dialog is measured in dialog units
instead of in pixels, so that it works for different display
resolutions.  In the vertical it's 8 dialog units to the font height
and in the horizontal it's 4 dialog units to the average character
width.  See the docs for GetDialogBaseUnits().

> I'm also doing some runtime font changing stuff too (the bolded
> headers within the pages), so that could come into play here as
> well.

I've seen that, and this should probably be aligned, too.  But it's
not a functional problem AFAICS, because it doesn't change the base
font of the window, but only the font of specific controls.

> wrote:
>> If there is interest I can at least provide the code that I used to
>> check the font that the main window is using and to write that to
>> the log file.
> I'm definitely interested in figuring out what's going on here and
> fixing it once and for all.

Attached is the code that I have used to see how the system
synthesizes the property sheet main window.  It parses the details in
the DLGTEMPLATE that is passed in the PSCB_PRECREATE message.

so long, benny

-------------- next part --------------
A non-text attachment was scrubbed...
Name: propsheet.diff
Type: text/x-patch
Size: 2658 bytes
Desc: not available
URL: <>

More information about the Cygwin-apps mailing list