Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Do you use WTL in production code?

Do you use WTL in production code?

Scheduled Pinned Locked Moved C / C++ / MFC
c++linuxquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jim Lamb
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • J Jim Lamb

      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

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      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?

      J 1 Reply Last reply
      0
      • M Michael Dunn

        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?

        J Offline
        J Offline
        Jim Lamb
        wrote on last edited by
        #3

        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

        M 1 Reply Last reply
        0
        • J Jim Lamb

          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

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          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?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups