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. Change the colour in c

Change the colour in c

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

    Hi all friends; I am a beginner in c(win32 console). I want to change the colour of characters & background in c. How to do it? PLEASE EXPLAIN AS COMPLETE AS POSSIBLE... Thanks all.

    D L C 3 Replies Last reply
    0
    • H hasani2007

      Hi all friends; I am a beginner in c(win32 console). I want to change the colour of characters & background in c. How to do it? PLEASE EXPLAIN AS COMPLETE AS POSSIBLE... Thanks all.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      hasani2007 wrote:

      PLEASE EXPLAIN AS COMPLETE AS POSSIBLE...

      1. Read the guidelines[^] before posting a question. 2. Do not use capitals to emphasise, it is considered bad manners. 3. Do not make demands for full explanations/code. People will give what they can without being prompted. 4. Learn to use Google, Bing and MSDN to do your own research first. This link[^] has some suggestions to get what you want.

      It's time for a new signature.

      1 Reply Last reply
      0
      • H hasani2007

        Hi all friends; I am a beginner in c(win32 console). I want to change the colour of characters & background in c. How to do it? PLEASE EXPLAIN AS COMPLETE AS POSSIBLE... Thanks all.

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        hasani2007 wrote:

        I want to change the colour of characters & background in c.

        Check out SetConsoleTextAttribute().

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Man who follows car will be exhausted." - Confucius

        1 Reply Last reply
        0
        • H hasani2007

          Hi all friends; I am a beginner in c(win32 console). I want to change the colour of characters & background in c. How to do it? PLEASE EXPLAIN AS COMPLETE AS POSSIBLE... Thanks all.

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

          What about documentation: "Using Console (Windows)"? :)

          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
          [My articles]

          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