flat assembler
Message board for the users of flat assembler.
Index
> Windows > ListBox coloring |
Author |
|
Rayslava 08 Mar 2006, 11:00
http://www.c-sharpcorner.com/Code/2005/April/ListBox.gif
Could anybody help to get such a fine listbox using FASM? Where every line of list has own color. Icons in the left aren't necessary, but they wouldn't be needless |
|||
08 Mar 2006, 11:00 |
|
Vasilev Vjacheslav 08 Mar 2006, 18:45
download source code and port it to fasm
http://www.c-sharpcorner.com/Code/2005/April/DotNETColorListBox.asp |
|||
08 Mar 2006, 18:45 |
|
r22 09 Mar 2006, 04:18
A VC++ code for OWNER DRAW colored listboxes can be found here
http://www.codeguru.com/cpp/controls/listbox/colorlistboxes/article.php/c1611/ Porting it to assembly would be some work but it's better than .NET |
|||
09 Mar 2006, 04:18 |
|
mathi 09 Mar 2006, 06:34
The source is in nasm.
Shouldn't be difficult to convert it to fasm. Hope this helps. Regards, Mathi. http://www.geocities.com/mathiisalive/
|
|||||||||||
09 Mar 2006, 06:34 |
|
shoorick 09 Mar 2006, 07:36
this is a part of my code (converted once from c example)
1. Code: cmp eax,WM_NOTIFY jne @F mov eax,[lParam] mov ecx,[list_1] cmp [eax + NMHDR.hwndFrom],ecx jne .exit_false cmp [eax + NMHDR.code],NM_CUSTOMDRAW jne .exit_false stdcall ProcessCustomDraw,eax invoke SetWindowLong,[hWnd],DWL_MSGRESULT,eax jmp .exit_true ... 2. Code: proc ProcessCustomDraw lParam push ebx mov ebx,[lParam] mov eax,[ebx + NMLVCUSTOMDRAW.nmcd + NMCUSTOMDRAW.dwDrawStage] cmp eax,CDDS_PREPAINT jne @F mov eax,CDRF_NOTIFYITEMDRAW jmp .done @@: ; cmp eax,CDDS_ITEMPREPAINT ; jne @F ; mov eax,CDRF_NOTIFYSUBITEMDRAW ; jmp .done ;@@: cmp eax,CDDS_ITEMPREPAINT jne @F cmp [ebx + NMLVCUSTOMDRAW.nmcd + NMCUSTOMDRAW.dwItemSpec],-1 ja .done_skip push [wht_col] pop [ebx + NMLVCUSTOMDRAW.clrTextBk] mov eax,CDRF_NEWFONT jmp .done @@: .done_skip: mov eax,CDRF_DODEFAULT .done: pop ebx ret endp ====== little explanation to attachment: i made listview background "gray" sending WM_DISABLE to it, and then "colouring" valid items with usual white colour. lately i just start use LVM_SETBKCOLOR
|
|||||||||||
09 Mar 2006, 07:36 |
|
shoorick 09 Mar 2006, 11:30
btw, i just noticed that i've been mixing listbox with listview not sure that technic will help for colouring listbox also...
|
|||
09 Mar 2006, 11:30 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.