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 problem

Font size problem

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
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
    pri_skit
    wrote on last edited by
    #1

    I am using CListBox(MFC Class) which have some strings added to it.I want to display different string in different font.Is this possible?How this could be done? regards,

    priyank

    J N 2 Replies Last reply
    0
    • P pri_skit

      I am using CListBox(MFC Class) which have some strings added to it.I want to display different string in different font.Is this possible?How this could be done? regards,

      priyank

      J Offline
      J Offline
      James R Twine
      wrote on last edited by
      #2

      If you need different strings within the same control to be shown using different drawing styles (or fonts), you will likely need to do an owner-drawn control.    I have an article that custom draws in a Combo-Box, and there are others around as well, like for drawing font names in their respective fonts.  They will likely translate well for what you have to do.    Try searching on this site for "Owner draw", "Owner drawn", "owner-draw", etc. for more details.  Stay away from "Custom Draw", because that generally only applies to the newer Win32 controls (i.e. CListCtrl but not CListBox).    Peace!

      -=- James
      Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
      Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
      See DeleteFXPFiles

      1 Reply Last reply
      0
      • P pri_skit

        I am using CListBox(MFC Class) which have some strings added to it.I want to display different string in different font.Is this possible?How this could be done? regards,

        priyank

        N Offline
        N Offline
        Nelek
        wrote on last edited by
        #3

        Take a look in your documentation. If CListBox::SetItemHeight (...) exists... is because it will most probably be possibl to change sizes and fonts. Read about the LBS_OWNERDRAWVARIABLE style as well. And if you want examples... take a look here[^]

        Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you ;)

        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