This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Setup.exe: Font issue
- From: Benjamin Riefenstahl <Benjamin dot Riefenstahl at epost dot de>
- To: cygwin-apps at cygwin dot com
- Date: Mon, 19 May 2003 15:11:44 +0200
- Subject: Setup.exe: Font issue
Hi,
I always used to have problems with the package selection page in
setup.exe (on W2K, using a custom screen resolution of 144 dpi). The
package list never showed the vertical scrollbar. In the current
version the mouse wheel didn't work either (another patch coming), so
I couldn't scroll the list at all.
I tracked this down now to a font issue. Turns out that the main
window of the PropertySheet wizard uses the font alias "MS Shell Dlg"
as its base font (as seen in the DLGTEMPLATE passed to
PSCB_PRECREATE). The individual pages use the font alias "MS Sans
Serif" as set in the resource file. With larger screen resolutions,
this results in widely different ideas about the size of the dialog
units that are used to measure dialogs and controls. The result is
that the vertical scrollbar of the list was outside of the clipping
region that the main window had set up.
The simplest fix was to change the font in the resource file (patch
attached). This is certainly better than the current situation, but I
am not sure this is the best solution, as I am not sure that it is
documented and garanteed that the wizard will use this specific font
alias.
Ideally we want either set the font for the main window to "MS Sans
Serif" at an apropriate time (i.e. before dialog units are converted
to pixel units), or in some other way synchronize the font for the
individual sheets with the main window at runtime. I have not found a
simple way to do this yet, though.
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.
so long, benny
2003-05-19 Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de>
* res.rc (all dialogs): Change font from "MS Sans Serif" to "MS
Shell Dlg".
--- res.rc.~2.48.~ 2003-03-09 03:39:42.000000000 +0200
+++ res.rc 2003-05-18 22:29:48.000000000 +0200
@@ -31,7 +31,7 @@
IDD_SOURCE DIALOG DISCARDABLE 0, 0, 317, 179
STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Choose Installation Type"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "&Install from Internet",IDC_SOURCE_NETINST,"Button",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,101,69,115,10
@@ -51,7 +51,7 @@
IDD_VIRUS DIALOG DISCARDABLE 0, 0, 317, 179
STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Disable Virus Scanner?"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "&Disable Virus scanner",IDC_DISABLE_AV,"Button",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,101,69,115,10
@@ -71,7 +71,7 @@
IDD_LOCAL_DIR DIALOG DISCARDABLE 0, 0, 317, 179
STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Select Local Package Directory"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
EDITTEXT IDC_LOCAL_DIR,58,83,165,15,ES_AUTOHSCROLL | WS_GROUP
PUSHBUTTON "B&rowse...",IDC_LOCAL_DIR_BROWSE,223,83,34,14
@@ -88,7 +88,7 @@
IDD_ROOT DIALOG DISCARDABLE 0, 0, 317, 179
STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Choose Installation Directory"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX "Root Directory",IDC_STATIC,5,50,305,40,WS_TABSTOP
GROUPBOX "Install For",IDC_STATIC,5,105,150,50,WS_TABSTOP
@@ -117,7 +117,7 @@
WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTROLPARENT
CAPTION "Choose Download Site(s)"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
ICON IDI_CYGWIN,IDC_STATIC,290,0,20,20
LISTBOX IDC_URL_LIST,66,45,185,110,LBS_NOINTEGRALHEIGHT |
@@ -140,7 +140,7 @@
IDD_NET DIALOG DISCARDABLE 0, 0, 317, 179
STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Select Connection Type"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "&Direct Connection",IDC_NET_DIRECT,"Button",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,55,73,10
@@ -170,7 +170,7 @@
STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
CAPTION "Cygwin Setup"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Installing...",IDC_INS_ACTION,45,55,205,8,NOT WS_GROUP
LTEXT "(PKG)",IDC_INS_PKG,45,70,205,8,NOT WS_GROUP
@@ -196,7 +196,7 @@
IDD_PROXY_AUTH DIALOG DISCARDABLE 0, 0, 215, 95
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Proxy Authentication required"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
ICON IDI_CYGWIN,IDC_STATIC,5,5,20,20
LTEXT "Proxy &User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE,
@@ -213,7 +213,7 @@
IDD_NET_AUTH DIALOG DISCARDABLE 0, 0, 215, 95
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Server Authentication required"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
ICON IDI_CYGWIN,IDC_STATIC,5,5,20,20
LTEXT "&User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE,
@@ -231,7 +231,7 @@
STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_CHILD | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU
CAPTION "Cygwin Setup"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
ICON IDI_CYGWIN,IDC_STATIC,113,112,21,20,WS_GROUP
// CONTROL "",IDC_STATIC,"Static",SS_WHITERECT,0,0,95,178
@@ -250,7 +250,7 @@
STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_CHILD | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU
CAPTION "Create Icons"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "Create icon on &Desktop",IDC_ROOT_DESKTOP,"Button",
BS_AUTOCHECKBOX,108,78,100,8
@@ -268,7 +268,7 @@
IDD_FTP_AUTH DIALOG DISCARDABLE 0, 0, 215, 95
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "FTP Authentication required"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
ICON IDI_CYGWIN,IDC_STATIC,5,5,20,20
LTEXT "&User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE,
@@ -286,7 +286,7 @@
STYLE DS_MODALFRAME | DS_3DLOOK | WS_CHILD | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
CAPTION "Select Packages"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "&Keep",IDC_CHOOSE_KEEP,"Button",BS_AUTORADIOBUTTON |
WS_GROUP | WS_TABSTOP,105,30,30,10