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. Unwanted color change when Edit box is ReadOnly

Unwanted color change when Edit box is ReadOnly

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

    Hi, all :) I am experiencing a problem, when I change an edit box into readonly/lock state the backgroundcolor of control changes into the buttonface system color. How can I prevent this or choose a different color? Thanks in advance Aidman » over and out We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.

    L R A J 4 Replies Last reply
    0
    • A Aidman

      Hi, all :) I am experiencing a problem, when I change an edit box into readonly/lock state the backgroundcolor of control changes into the buttonface system color. How can I prevent this or choose a different color? Thanks in advance Aidman » over and out We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #2

      u have to trap the OnCtlColor() event but as i recall edit boxes dont play nice and repaint themselves in a few places so it can be a bit of a b*itch


      "penguins have no bill"
      biz stuff   about me

      1 Reply Last reply
      0
      • A Aidman

        Hi, all :) I am experiencing a problem, when I change an edit box into readonly/lock state the backgroundcolor of control changes into the buttonface system color. How can I prevent this or choose a different color? Thanks in advance Aidman » over and out We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.

        R Offline
        R Offline
        Renjith Ramachandran
        wrote on last edited by
        #3

        return a White Brush in OnCtlColor()

        1 Reply Last reply
        0
        • A Aidman

          Hi, all :) I am experiencing a problem, when I change an edit box into readonly/lock state the backgroundcolor of control changes into the buttonface system color. How can I prevent this or choose a different color? Thanks in advance Aidman » over and out We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.

          A Offline
          A Offline
          Aidman
          wrote on last edited by
          #4

          Ok, Thanks mates :) I will try that out Aidman » over and out We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.

          1 Reply Last reply
          0
          • A Aidman

            Hi, all :) I am experiencing a problem, when I change an edit box into readonly/lock state the backgroundcolor of control changes into the buttonface system color. How can I prevent this or choose a different color? Thanks in advance Aidman » over and out We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.

            J Offline
            J Offline
            John M Drescher
            wrote on last edited by
            #5

            This is the default windows behavior. Unless it is absolutly necissary I would not change it because it will confuse your users who will expect to be able to edit the box. John

            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