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 edit font color

change edit font color

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

    how can i change edit font color???

    S M N 3 Replies Last reply
    0
    • P pnpfriend

      how can i change edit font color???

      S Offline
      S Offline
      shokisingh
      wrote on last edited by
      #2

      if u r using a DC to output u'r text, then u can change u'r font color by setting DC's SetTextColor property:omg: Ashok Singh

      1 Reply Last reply
      0
      • P pnpfriend

        how can i change edit font color???

        M Offline
        M Offline
        moliate
        wrote on last edited by
        #3

        Use CDC::SetTextColor in CWnd::OnCtlColor. I think there are some good articles explaining this on CP. Cheers /moliate

        P 1 Reply Last reply
        0
        • P pnpfriend

          how can i change edit font color???

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          Read Mike Dunn's FAQ. It will answer 50% of all commonly asked questions. Nish


          The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?

          1 Reply Last reply
          0
          • M moliate

            Use CDC::SetTextColor in CWnd::OnCtlColor. I think there are some good articles explaining this on CP. Cheers /moliate

            P Offline
            P Offline
            pnpfriend
            wrote on last edited by
            #5

            //this is how i set the size and the ==== bold //setting edit box yfont size LogFont.lfHeight = 15; LogFont.lfWeight = FW_BOLD; newFont.CreateFontIndirect(&LogFont); GetDlgItem(IDC_EDIT1)->SetFont(&newFont); CEdit* smpEdit = (CEdit*)GetDlgItem(IDC_EDIT1); smpEdit->SetWindowText(afileName);

            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