Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing disabled CEdit boxes appearance

Status
Not open for further replies.

SpenBabe

Programmer
Sep 25, 2000
70
GB
When you call EnableWindow(FALSE) on a CEdit box, it shows dark gray text on light gray background (using standard Windows colour scheme)

Basically, I want to show all the controls on a form/dialog read-only initially & only enable them when it right to do so. Unfortunately it looks "crap".

I have used ModifyStyle(NULL, WS_DISABLED, 0) to set the read-only, but they still retain the look of enabled edit boxes, which confuses the end-users.

How do I set read-only controls to say black text on light gray background ?

I know I can do this, because I did it a few years ago, but have forgotten where & how.

Or, has anyone got any better ideas ?

Spencer Window (not a joke name)
 
Try to subclass your control and to handle keyboard messages without returning them to control. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top