i'm having problem when using the
SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM) szString);
the szString contain the string that wanted to add into the listbox
the SendMessage is inside a function code..
when the main code run until a certain point, it enter the function and at the end of the function, it suppose to update the listbox with the text..but it's not updating..
here's the question...must the SendMessage be always in the WM_COMMAND or can be anywhere in the code..
thanks..
Notice the extra parameter. The hwnd is the main window in which the listbox is situated. The ID_LISTBOX parameter is the ID value you assigned to the listbox.
I suspect you haven't properly gotten the handle to the listbox. The above code takes care of that.
thanks Lamblion =)
i found out why the reason it's not sending..i forgot to include the hwndList in the global variable =P but i'll use your method..it seem to be more efficient =)