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. Colored Text in win32 window

Colored Text in win32 window

Scheduled Pinned Locked Moved C / C++ / MFC
help
4 Posts 4 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.
  • U Offline
    U Offline
    User 3822629
    wrote on last edited by
    #1

    Plz, Help! I need to set colored text in win32 window - in code. but it must be no only one color - it must be 3 colors to specified texts - one text blue, one text - red one - text green and all texts must be at ones in one window. plz, help!

    D C H 3 Replies Last reply
    0
    • U User 3822629

      Plz, Help! I need to set colored text in win32 window - in code. but it must be no only one color - it must be 3 colors to specified texts - one text blue, one text - red one - text green and all texts must be at ones in one window. plz, help!

      D Offline
      D Offline
      Demian Panello
      wrote on last edited by
      #2

      You should check TextOut function[^] And also read about objects like Pens and Fonts.

      Demian. "I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone." -Bjarne Stroustrup, computer science professor, designer of C++ programming language (1950- )

      1 Reply Last reply
      0
      • U User 3822629

        Plz, Help! I need to set colored text in win32 window - in code. but it must be no only one color - it must be 3 colors to specified texts - one text blue, one text - red one - text green and all texts must be at ones in one window. plz, help!

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #3

        SetTextColor. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

        1 Reply Last reply
        0
        • U User 3822629

          Plz, Help! I need to set colored text in win32 window - in code. but it must be no only one color - it must be 3 colors to specified texts - one text blue, one text - red one - text green and all texts must be at ones in one window. plz, help!

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          For each text you can use of SetTextColor.

          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