TXT_TITLE equ 202
TXT_AUTHOR equ 203
TXT_TARGET equ 204
TXT_INFO equ 205

.code
invoke CreateWindowEx, 0, addr szEditClass, 0, WS_CHILD or WS_VISIBLE or WS_BORDER or ES_READONLY,
50, 5, 240, 15, hWin, TXT_TITLE, 400000h, 0

invoke CreateWindowEx, 0, addr szEditClass, 0, WS_CHILD or WS_VISIBLE or WS_BORDER or ES_READONLY,
50, 25, 240, 15, hWin, TXT_AUTHOR, 400000h, 0

invoke CreateWindowEx, 0, addr szEditClass, 0, WS_CHILD or WS_VISIBLE or WS_BORDER or ES_READONLY,
50, 45, 240, 15, hWin, TXT_TARGET, 400000h, 0

invoke CreateWindowEx, 0, addr szEditClass, 0, WS_CHILD or WS_VISIBLE or WS_BORDER or ES_READONLY or ES_MULTILINE,
5, 65, 285, 115, hWin, TXT_INFO, 400000h, 0

[...]

.elseif uMsg == WM_CTLCOLORSTATIC

invoke GetWindowLong, lParam, GWL_ID

.if (eax == TXT_TITLE || eax == TXT_AUTHOR || eax == TXT_TARGET || eax == TXT_INFO)

invoke GetStockObject, WHITE_BRUSH
ret

.endif

[...]


HTH!

bAZiK
Posted on 2001-10-20 04:13:07 by bazik
hm, my read only edit boxes always have a white background. maybe i'm doing something wrong :tongue:
Posted on 2001-10-20 11:51:58 by Tola
Hi bAZiK

.elseif uMsg == WM_CTLCOLORSTATIC

Should not this be:

.elseif uMsg == WM_CTLCOLOREDIT

KetilO
Posted on 2001-10-20 12:09:31 by KetilO
No, bAZiK is right, read-only or disabled edit controls receive a WM_CTLCOLORSTATIC instead a of WM_CTLCOLOREDIT, bah :confused:.
Posted on 2001-10-20 12:33:53 by LuHa
Hi LuHa, 1-0 to you.

Here is a simple prohect showing LuHa is right.
My only excuse, VB does it different.

KetilO
Posted on 2001-10-20 20:08:45 by KetilO
:grin:
Posted on 2001-10-21 04:48:18 by LuHa