how i can make a edit control with es_readonly but leaving the white background? ideas?
thx
thx
Read-only edit controls colours are controlled by WM_CTLCOLOR_STATIC.
Hmm... instead of:
invoke GetStockObject, WHITE_BRUSH
...wouldn't a more user friendly version be:
invoke GetSysColorBrush, COLOR_WINDOW
?
A lot of systems use pure white as the edit box color, but not all. It's quite possible that the user has black windows with white text, in which case setting the edit control to WHITE_BRUSH would make the text illegible.
invoke GetStockObject, WHITE_BRUSH
...wouldn't a more user friendly version be:
invoke GetSysColorBrush, COLOR_WINDOW
?
A lot of systems use pure white as the edit box color, but not all. It's quite possible that the user has black windows with white text, in which case setting the edit control to WHITE_BRUSH would make the text illegible.
iblis,
read the subject again: edit control readonly + white background ?
:grin:
read the subject again: edit control readonly + white background ?
:grin:
Yeah, and if I were to always interpret every sentence witten on these message boards literally word-for-word, I'd still be in the basement holding a ruler up to a piece of yarn trying to find the 'string length'. :p A little reinterpretation never hurt anybody.
"Leaving" in that sentence implies that he wishes to keep the default edit control color that you see in most non-readonly edit controls. In many cases that color is white, but not always. I'm sure you just love to nit pick, but rest assured I was simply trying to help the guy solve his problem. Furthermore, I wanted to point out that setting an edit control background brush to WHITE may be detrimental if you don't know what color the text is.
how i can make a edit control with es_readonly but leaving the white background? ideas?
"Leaving" in that sentence implies that he wishes to keep the default edit control color that you see in most non-readonly edit controls. In many cases that color is white, but not always. I'm sure you just love to nit pick, but rest assured I was simply trying to help the guy solve his problem. Furthermore, I wanted to point out that setting an edit control background brush to WHITE may be detrimental if you don't know what color the text is.