المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Is there an easy way to have read only edit boxes or controls which are not all "greyed" out.



C++ Programming
09-22-2009, 08:00 AM
Using VC6 & MFC

Most MFC controls have a "Read Only" property so you can stop the user from making any changes to the value. However when you do this the control is displayed all in grey colours which makes it harder to read. Is there any easy way to make these controls "read only" but keep them obvious on screen, ie say in the default black and white ?

I am sure it can be done by overrding CEdit or similar and writing your own display code but this seems a bit to much like hard work.

Perhaps there is an easy was to make the controls read only which does'nt result in them becoming all grey ?