Do you use WTL in production code?
-
I've noticed that the base dialog class in WTL doesn't handle adjusting the font of the dialog template to the shell font. MFC does handle this, but I'd prefer to use WTL due to its light weight. I'm contemplating modifying the WTL source directly, but if someone has another solution, I'd love to hear it. Thanks, Jim
-
I've noticed that the base dialog class in WTL doesn't handle adjusting the font of the dialog template to the shell font. MFC does handle this, but I'd prefer to use WTL due to its light weight. I'm contemplating modifying the WTL source directly, but if someone has another solution, I'd love to hear it. Thanks, Jim
Yeah, set the FONT line in your dialog resources to "MS Shell Dlg" and add the dialog style DS_SHELLFONT. You'll have to do that by manually editing the .RC file, and if you ever modify your dialogs with the resource editor, it will remove those changes and you'll have to make them again. I think the MFC way of modifying the font on the fly is some serious legacy code, since the purpose of MS Shell Dlg is to have the OS pick the right font automagically. --Mike-- http://home.inreach.com/mdunn/ Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese? Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
-
Yeah, set the FONT line in your dialog resources to "MS Shell Dlg" and add the dialog style DS_SHELLFONT. You'll have to do that by manually editing the .RC file, and if you ever modify your dialogs with the resource editor, it will remove those changes and you'll have to make them again. I think the MFC way of modifying the font on the fly is some serious legacy code, since the purpose of MS Shell Dlg is to have the OS pick the right font automagically. --Mike-- http://home.inreach.com/mdunn/ Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese? Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
-
Problem is, extended dialog templates aren't supported on Windows 95 (they cause a GPF). I suppose one could simply choose not to support Windows 95 (as Microsoft has), but I'd prefer to have the option of supporting it. Jim
Really? That seems odd, and the DLGTEMPLATEEX docs say it's supported on Win 95. I'll have to try that out myself since I have code that uses DIALOGEXs. The docs for DS_SHELLFONT say "It is also recommended that you use the DIALOGEX resource" so it might work with a plain DIALOG. If not, then I suppose MFC's way is the best way. --Mike-- http://home.inreach.com/mdunn/ Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese? Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?