Hey I want to make a listbox, which has TRANSPARENT Backround and uses green Text. I stored a listbox in my *.res (Dialog). Now i used this code to do what I want:

m2m myDC,wParam
mov ecx,lParam
RGB 0,255,0
invoke SetTextColor,myDC,eax
invoke SetBkMode,myDC,TRANSPARENT
invoke GetStockObject,NULL_BRUSH
return eax

So, at the beginning everything seems to work well, but if I "Drag 'n' Drop" a file into listbox, then everything goes mad. One text writes onto another and when I marked one item then it stays Blue, even when I mark another one. Thats Shit!

So can you tell me how to prevent of that. In my eyes, I tried nearly everything.

thanx Flyke

P.S.: Here is my "Drag 'n' Drop"-code-event, maybe you need to solve my problem:

.elseif uMsg == WM_DROPFILES
invoke DragQueryFile,wParam,0,addr buffer1,128
invoke SendDlgItemMessage,hwndDlg,ListBoxID,LB_GETCURSEL,0,0
inc eax
mov edx,eax
invoke SendDlgItemMessage,hwndDlg,ListBoxID,LB_INSERTSTRING,edx,addr buffer1
invoke SendDlgItemMessage,hwndDlg,ListBoxID,LB_SETCURSEL,edx,0

Posted on 2003-01-18 05:04:28 by ChigpA

invoke GetDlgItem, hwndDlg, ListBoxID
invoke RedrawWindow, eax, 0, 0, RDW_INVALIDATE
Posted on 2003-01-18 09:47:07 by comrade