Change the Dialog Font (*NOT* the document or printer fonts)

Display customization and font issues

Change the Dialog Font (*NOT* the document or printer fonts)

Postby alfredo » Wed Jul 22, 2009 7:16 pm

This was a company-purchased licence for Ultraedit version 10.20d.

How do I change the font used in the dialogs? -- I find it really hard to discern the characters in, for example, the 'Replace' dialog.

I can change the font of the Menubars using Windows / Start / Control Panel /Display, but Ultraedit *ignores* the Windows settings for the body of the dialogs. See screenshot.
Attachments
ultraedit_dialog_ignorance.png
Ultraedit ignores Windows / Control Panel / Display settings
ultraedit_dialog_ignorance.png (53.47 KiB) Viewed 2342 times
alfredo
Newbie
 
Posts: 1
Joined: Wed Jul 22, 2009 7:08 pm

Re: Change the Dialog Font (*NOT* the document or printer fonts)

Postby Mofi » Thu Jul 23, 2009 1:11 am

alfredo wrote:but Ultraedit *ignores* the Windows settings for the body of the dialogs.

As also many other Windows applications because the font and the font size used in the dialogs are defined in the dialog resources. I guess you are using a normal/small computer display with a very high resolution. Bad luck, you bought the wrong, sorry. You can try if changing the general Windows font size to Large or Extra Large in the Display properties helps, but this causes often truncated text in the dialogs and bars.

For better understanding what I mean with "defined in the dialog resources", here is such a dialog resource. See the 4th line.

Code: Select all
101 DIALOGEX 40, 40, 166, 140
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "Macro Play"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 8, "MS Shell Dlg"
{
   CONTROL "Select macro to play:", -1, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 6, 6, 154, 8
   CONTROL "", 192, LISTBOX, LBS_STANDARD | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 6, 18, 154, 61
   CONTROL "Specify number of times\n to repeat macro: ", -1, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 6, 83, 112, 19
   CONTROL "", 109, EDIT, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 123, 85, 37, 13
   CONTROL "Play macro to End of File", 502, BUTTON, BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 6, 106, 154, 10
   CONTROL "&OK", 1, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 56, 120, 50, 14
   CONTROL "&Cancel", 2, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 110, 120, 50, 14
}

Well, to be 100% correct the x- and y-coordinates and the width and height values in the dialog resources are not pixel values. They depend on the font size. The example above is from UE v15.10 which uses in dialogs the font the user can customize in the registry. (Maybe also somewhere else, I don't know.)

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"MS Shell Dlg"="Microsoft Sans Serif"
"MS Shell Dlg 2"="Tahoma"

Here is the resource of the same dialog from UE v10.20:

Code: Select all
101 DIALOG 40, 40, 166, 143
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "Macro Play"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 8, "MS Sans Serif"
{
   CONTROL "Select macro to play:", -1, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 8, 4, 88, 11
   CONTROL "", 192, LISTBOX, LBS_STANDARD | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 8, 18, 150, 61
   CONTROL "Specifiy number of times\n to repeat macro: ", -1, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 8, 85, 86, 19
   CONTROL "", 109, EDIT, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 104, 87, 54, 13
   CONTROL "Play macro to End of File", 502, BUTTON, BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 8, 106, 150, 10
   CONTROL "OK", 1, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 101, 124, 39, 14
   CONTROL "Cancel", 2, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 27, 124, 39, 14
}

As you can see the font is fixed in the resource in this version of UltraEdit. Of course when you look on the registry values, the font "MS Shell Dlg" is by default "MS Sans Serif". Microsoft Sans Serif was the default and only used font for dialogs a very long time. That's also the reason why you can't uninstall this font.

What does this mean now for you? Your company either update to latest version of UltraEdit or you hack the font specification in all dialog resources of UltraEdit v10.20d with a resource hacker. Don't forget, UE v10.20d is more than 5 years old (= at least 2 computer generations).
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Change the Dialog Font (*NOT* the document or printer fonts)

Postby ramasaig » Sat Sep 26, 2009 4:32 am

I happened upon this posting by chance. I've often wondered if I could increase the font size in the Find & Replace dialogs. You imply that it can be done in the latest versions of UE, but I've not found it (yet). If it really is possible within UE, could you point me in the right direction, please. (I'm not looking for a massive exercise in the Registry or in global Windows settings).

My UE settings are in 'uedit32b.ini' in '%Application Data%'. OS is WinXP SP3, UE 1520 Beta 4.

Regards,

Tim Dawson
ramasaig
Newbie
 
Posts: 1
Joined: Sat Sep 26, 2009 3:34 am

Re: Change the Dialog Font (*NOT* the document or printer fonts)

Postby Mofi » Sun Sep 27, 2009 10:25 am

It is not possible to change the font in some dialogs only. You can change the font and the font color for dialogs which are global settings used for all applications. And although the font size can be also modified in the Windows display settings, most resources of applications contain the font size and therefore the font size in dialogs is often fixed and can be modified only by using a resource hacking tool and modify all the resources of a dialog. It is not possible to change the font size for the find and replace dialogs in UltraEdit.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Editor Display