Hi!

How to change colors in the lists? I create it with
invoke CreateWindowEx, WS_EX_CLIENTEDGE, CStr("LISTBOX"), NULL,
WS_CHILD or WS_VISIBLE or WS_VSCROLL or ES_AUTOVSCROLL or WS_BORDER or \
LBS_HASSTRINGS or LBS_NOINTEGRALHEIGHT or LBS_DISABLENOSCROLL,
0,0,right,108,
hWin,NULL,hInstance,0
mov hList, eax

and later try this:
invoke BeginPaint,hList, ADDR ps
mov hdc,eax
invoke SetTextColor,hdc, lightBlue ;?????????? ???? ???????
invoke SetBkColor,hdc,darkBlue ;?????????? ??? ????
invoke EndPaint,hWnd, ADDR ps

but without effect

Thanks to everybody who helps me.

Mike
Posted on 2003-03-20 06:22:07 by Mike
Hi Mike,







.if msg == WM_CTLCOLORLISTBOX
call SetTextColor, wParam, 0ffffffh
call SetBkMode, wParam,TRANSPARENT
call CreateSolidBrush, 00ff00h
ret
.endif



if want change two or more listbox color:



.if msg == WM_CTLCOLORLISTBOX

.if lParam == hlist1
call SetTextColor, wParam, 0ffffffh
call SetBkMode, wParam,TRANSPARENT
call CreateSolidBrush, 00ff00h
ret
.elseif lParam == hlist2

call SetTextColor, wParam, 0fffh
call SetBkMode, wParam,TRANSPARENT
call CreateSolidBrush, 00ffffh
ret

.endif

.endif



Regards,
Posted on 2003-03-20 07:24:28 by CYDONIA
Thanks for your reply. But are you sure CYDONIA? It is not working. May be I do smth bad? See program attached to letter. I write all AS IS.
Posted on 2003-03-20 08:47:02 by Mike
Hi!

I modified your code and here is an example of colored listboxes.
Look somwhere at the end of your WndProc, there is the listbox-code.
(The lcase-function made some errors with my linker so I turned it off, but you can turn it on again if you want)

bye ChigpA
Posted on 2003-03-20 11:09:34 by ChigpA
Hi Mike,

Another example :d (Not modified by me)

Regards,
Posted on 2003-03-20 23:44:29 by CYDONIA
Thanks!

You help me!

Mike
Posted on 2003-03-21 06:21:09 by Mike