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. How can i change color of a specific word in a sentence

How can i change color of a specific word in a sentence

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
9 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.
  • E Offline
    E Offline
    emmatty
    wrote on last edited by
    #1

    Hello, I am writing an application in which user can type sentences.I need to change colors some keywords in that sentence into blue. How can i accomplish this task in VC++. Thanks in advance:-D, John.

    C 1 Reply Last reply
    0
    • E emmatty

      Hello, I am writing an application in which user can type sentences.I need to change colors some keywords in that sentence into blue. How can i accomplish this task in VC++. Thanks in advance:-D, John.

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      You don't give us a lot of useful informations ! What kind of application are you doing ? Console, Win32 ? With or without MFC ? And where is this text written ? In a control or what ?

      E 1 Reply Last reply
      0
      • C Cedric Moonen

        You don't give us a lot of useful informations ! What kind of application are you doing ? Console, Win32 ? With or without MFC ? And where is this text written ? In a control or what ?

        E Offline
        E Offline
        emmatty
        wrote on last edited by
        #3

        Thanks for the fastest reply. I am developing a SDI application using MFC and the text will be written in the SDI's views . I am currently not using any kind of special controls. Once again,Thanks. John.

        T C 2 Replies Last reply
        0
        • E emmatty

          Thanks for the fastest reply. I am developing a SDI application using MFC and the text will be written in the SDI's views . I am currently not using any kind of special controls. Once again,Thanks. John.

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          emmatty wrote: I am developing a SDI application using MFC and the text will be written in the SDI's views Easiest way to Get above would be use CRichEditView instead of CView!. And Cedric -I am back in race :)

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta

          1 Reply Last reply
          0
          • E emmatty

            Thanks for the fastest reply. I am developing a SDI application using MFC and the text will be written in the SDI's views . I am currently not using any kind of special controls. Once again,Thanks. John.

            C Offline
            C Offline
            Cedric Moonen
            wrote on last edited by
            #5

            Is CDC::SetTextColor of any help ?

            T 1 Reply Last reply
            0
            • C Cedric Moonen

              Is CDC::SetTextColor of any help ?

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              Long time no see Bro:)

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              cheers, Alok Gupta

              C 1 Reply Last reply
              0
              • T ThatsAlok

                Long time no see Bro:)

                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                cheers, Alok Gupta

                C Offline
                C Offline
                Cedric Moonen
                wrote on last edited by
                #7

                Yep :-). You were in hollidays ? ;)

                T 1 Reply Last reply
                0
                • C Cedric Moonen

                  Yep :-). You were in hollidays ? ;)

                  T Offline
                  T Offline
                  ThatsAlok
                  wrote on last edited by
                  #8

                  cedric moonen wrote: You were in hollidays ? Yeap, celebrating holiday in hospital since last thursday due to intestine infection :). Now All ok!

                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                  cheers, Alok Gupta

                  C 1 Reply Last reply
                  0
                  • T ThatsAlok

                    cedric moonen wrote: You were in hollidays ? Yeap, celebrating holiday in hospital since last thursday due to intestine infection :). Now All ok!

                    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                    cheers, Alok Gupta

                    C Offline
                    C Offline
                    Cedric Moonen
                    wrote on last edited by
                    #9

                    Ouch.... Not so funny holidays X|

                    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