how i can make a edit control with es_readonly but leaving the white background? ideas?

thx
Posted on 2002-08-11 17:19:04 by hunter
Posted on 2002-08-11 17:22:12 by Thomas
Read-only edit controls colours are controlled by WM_CTLCOLOR_STATIC.
Posted on 2002-08-11 20:18:13 by comrade
Without the second underscore, comrade :)

http://www.asmcommunity.net/board/index.php?topic=1524
Posted on 2002-08-12 00:00:47 by bazik
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.
Posted on 2002-08-12 01:10:57 by iblis
iblis,

read the subject again: edit control readonly + white background ?

:grin:
Posted on 2002-08-12 02:11:41 by bazik
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.


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.
Posted on 2002-08-12 02:29:34 by iblis
:grin:
Posted on 2002-08-12 03:10:37 by bazik