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
hm, my read only edit boxes always have a white background. maybe i'm doing something wrong :tongue:
Hi bAZiK
.elseif uMsg == WM_CTLCOLORSTATIC
Should not this be:
.elseif uMsg == WM_CTLCOLOREDIT
KetilO
.elseif uMsg == WM_CTLCOLORSTATIC
Should not this be:
.elseif uMsg == WM_CTLCOLOREDIT
KetilO
No, bAZiK is right, read-only or disabled edit controls receive a WM_CTLCOLORSTATIC instead a of WM_CTLCOLOREDIT, bah :confused:.
Hi LuHa, 1-0 to you.
Here is a simple prohect showing LuHa is right.
My only excuse, VB does it different.
KetilO
Here is a simple prohect showing LuHa is right.
My only excuse, VB does it different.
KetilO