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. Large Character Text

Large Character Text

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
3 Posts 3 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.
  • P Offline
    P Offline
    pblais
    wrote on last edited by
    #1

    I've looked all over this site for controls or classes or anything to display text in a C++/MFC application. I would like to display characters that are at least 1 inch by 1 inch in size to be able to see them from wayyyyyyyyyy across the room. Anyone have any ideas???? Thank you in advance Pierre

    G 1 Reply Last reply
    0
    • P pblais

      I've looked all over this site for controls or classes or anything to display text in a C++/MFC application. I would like to display characters that are at least 1 inch by 1 inch in size to be able to see them from wayyyyyyyyyy across the room. Anyone have any ideas???? Thank you in advance Pierre

      G Offline
      G Offline
      G_S
      wrote on last edited by
      #2

      I would create a font the size you need it this steps i hope will help you The bellow is only if not on multiple monitors hdc = GetDC(NULL); nHeight = GetDeviceCaps(hdc, LOGPIXELSY); // returns the number of pixels per logical inch along the screen height. ReleaseDC(NULL,hdc); so you can create a font with the result of it wich should be exactly 1 in. hFont=CreateFont(nHeight,0,0,0,/*FW_BOLD*/0,0,0,0,0,0,0,0,0,"Georgia"); and then to draw it in a window use DrawText(.....); G_S

      R 1 Reply Last reply
      0
      • G G_S

        I would create a font the size you need it this steps i hope will help you The bellow is only if not on multiple monitors hdc = GetDC(NULL); nHeight = GetDeviceCaps(hdc, LOGPIXELSY); // returns the number of pixels per logical inch along the screen height. ReleaseDC(NULL,hdc); so you can create a font with the result of it wich should be exactly 1 in. hFont=CreateFont(nHeight,0,0,0,/*FW_BOLD*/0,0,0,0,0,0,0,0,0,"Georgia"); and then to draw it in a window use DrawText(.....); G_S

        R Offline
        R Offline
        Ryan Binns
        wrote on last edited by
        #3

        Almost... You'll need to use -nHeight, otherwise the height is specified in points, not pixels.

        Ryan

        "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

        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