开发者

System Default Dialog Font?

The default dialog box font in Windows is MS Shell Dlg.

I don't like it, because it's not correct.

It's easy to manually change the font of a single dialog item, but how do I display a dialog box with the "correct" system font (from lfMessageFont) applied to 开发者_如何学JAVAall of its controls by default (not manually) when calling DialogBox (or using ATL/WTL)?

System Default Dialog Font?

Note:

The reason I've said "not manually" so many times is that I am looking for a solution better than looping through everything with EnumChildWindows (or the like). Does one exist?


From About Dialog Boxes:

The system font can vary between different versions of Windows. To have your application use the system font no matter which system it is running on, use DS_SHELLFONT with the typeface MS Shell Dlg, and use the DIALOGEX Resource instead of the DIALOG Resource. The system maps this typeface such that your dialog box will use the Tahoma font. Note that DS_SHELLFONT has no effect if the typeface is not MS Shell Dlg.

I think this is what you want. If that doesn't work, then I guess you'll have to load the resource manually and modify the template before passing it to DialogBox.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜