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. Font Size limit?

Font Size limit?

Scheduled Pinned Locked Moved C / C++ / MFC
question
2 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.
  • O Offline
    O Offline
    Oliver123
    wrote on last edited by
    #1

    I am trying to change font size in an edit box with the following code. There seems to be a limit on the size I can get, regardless of the params in font.CreatePointFont. The max seems to be about 14 point bold. How can I get a larger size? CFont font; font.CreatePointFont(920, "Garamond"); CFont *pFont = (&font); GetDlgItem(IDC_EDIT_Utility)-> SetFont(pFont, TRUE);

    M 1 Reply Last reply
    0
    • O Oliver123

      I am trying to change font size in an edit box with the following code. There seems to be a limit on the size I can get, regardless of the params in font.CreatePointFont. The max seems to be about 14 point bold. How can I get a larger size? CFont font; font.CreatePointFont(920, "Garamond"); CFont *pFont = (&font); GetDlgItem(IDC_EDIT_Utility)-> SetFont(pFont, TRUE);

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      How are you checking to see if you get the requested size? You could try checking the created font to see the attributes of the created font: CFont font; font.CreatePointFont(920, "Garamond"); LOGFONT logfont; font.GetLogFont(&logfont); Is that the way you've coded to create the font? If so, if "font" goes out of scope then the fonts handle (HFONT) is destroyed. Mark

      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