WM_CREATE
invoke CreateWindowEx,WS_EX_CLIENTEDGE,ADDR ListClassName,0,WS_VSCROLL or WS_VISIBLE or WS_BORDER or WS_CHILD or \
LBS_HASSTRINGS or LBS_NOINTEGRALHEIGHT or LBS_SORT,120,50,200,310,hWnd,ListID,hInstance,NULL
mov hListBox,eax


.ELSEIF uMsg==WM_CHAR
invoke SendMessage,hListBox,LB_ADDSTRING,0,ADDR text
.ELSEIF uMsg==WM_COMPAREITEM
PrintDec eax
.ELSE


When i press the button strink is send to ListBox but WM_COMPAREITEM is not working.

could it be becouse im adding the same string ???

btw how can i know if new item was added without LBS_SORT and WM_COMPAREITEM

:confused:
Posted on 2003-04-02 11:08:52 by AceEmbler
As i see in search a lot of ppl used this message before :tongue:
Posted on 2003-04-02 12:43:58 by AceEmbler
I think that the Listbox has to have the LBS_OWNERDRAWFIXED or LBS_OWNERDRAWVARIABLE flag set to send the WM_COMPAREITEM message. You can use the LB_GETCOUNT message to check for changes in the number of items in the listbox, afaik there is no notification message for listbox changes.
Posted on 2003-04-02 12:54:22 by donkey
When i use LBS_OWNERDRAWFIXED i can add strings with LB_ADDSTRING. And why WM_VSCROL is not working with ListBox WS_VSCROLL ???
And why when i add string to ListBox whole background sets to invisible :) "0" and only the first one have proper bitmap background !!!!!!
Posted on 2003-04-02 13:33:03 by AceEmbler