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. Coloring Text

Coloring Text

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

    How do I make a specific word inside an list box green? Source Code: -------------------------------------------------------- CString tempString = ""; tempString.Format("You currently have $%s%d with you.", tempString, cash); CListBox * tempBox = (CListBox *)(this->GetDlgItem(IDC_LIST)); tempBox->AddString(tempString); -------------------------------------------------------- I want the word you to be green, what do I do? Thanks.

    R 1 Reply Last reply
    0
    • A arunforce

      How do I make a specific word inside an list box green? Source Code: -------------------------------------------------------- CString tempString = ""; tempString.Format("You currently have $%s%d with you.", tempString, cash); CListBox * tempBox = (CListBox *)(this->GetDlgItem(IDC_LIST)); tempBox->AddString(tempString); -------------------------------------------------------- I want the word you to be green, what do I do? Thanks.

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      Use an owner-drawn list box. See this[^] article. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

      A 1 Reply Last reply
      0
      • R Ravi Bhavnani

        Use an owner-drawn list box. See this[^] article. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

        A Offline
        A Offline
        arunforce
        wrote on last edited by
        #3

        I've already looked at that tutorial. The problem is I already have a list box set up, and if I try to change it to fixed or variable, my messages won't show up. Is there like a command like colorRGB[255,123,210] Uhh, thanks.

        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