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. CFontHolder

CFontHolder

Scheduled Pinned Locked Moved C / C++ / MFC
questioncomgraphicshelptutorial
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.
  • S Offline
    S Offline
    shiraztk
    wrote on last edited by
    #1

    Hi all In my activeX control I have certain texts whose fonts I need to change using CFontDialog. I cannot change the font using stock font since I need to have different font for different texts. How can I do this? This is what i did. I have a member of CFontHolder m_Font in my control. Then with SetFont and GetFont method am trying to change m_Font. But I dont know how to set a particular font to m_Font object. And then get the font from m_Font and select that to DC so that TextOut will be drawing text with that Font. Any help would of great help. Regards

    The Best Religion is Science. Once you understand it, you will know God.

    M 1 Reply Last reply
    0
    • S shiraztk

      Hi all In my activeX control I have certain texts whose fonts I need to change using CFontDialog. I cannot change the font using stock font since I need to have different font for different texts. How can I do this? This is what i did. I have a member of CFontHolder m_Font in my control. Then with SetFont and GetFont method am trying to change m_Font. But I dont know how to set a particular font to m_Font object. And then get the font from m_Font and select that to DC so that TextOut will be drawing text with that Font. Any help would of great help. Regards

      The Best Religion is Science. Once you understand it, you will know God.

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

      Maybe you've already seen this, but just in case, it may help... MFC ActiveX Controls: Using Fonts[^]

      "Go that way, really fast. If something gets in your way, turn."

      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