CListCtrl

I want to insert an item into a list ctrl from another thread. I am passing in the hwnd for the ctrl to the thread, but i can't figure out the message to send using SendMessage() in order to insert the item.
Any ideas guys ?
[238 byte] By [jase jennings] at [2007-11-17 22:39:34]
# 1 Re: CListCtrl
Isnt it LVN_INSERTITEM
Brandon Parker at 2007-11-10 8:41:40 >
# 2 Re: CListCtrl
nope. thats a notification message sent to the parent window after a listctrl inserts an item. it's not an instruction to the control to insert an item
jase jennings at 2007-11-10 8:42:40 >
# 3 Re: CListCtrl
Found a macro that takes care of it

LVITEM lvi;
lvi.pszText = (LPSTR)s.GetBuffer();
lvi.iItem = 0;
lvi.mask = LVIF_TEXT;

ListView_InsertItem(pt->hwndListCtrl, &lvi);
jase jennings at 2007-11-10 8:43:39 >
# 4 Re: CListCtrl
Sorry it is LVM_INSERTITEM

LVM_INSERTITEM
wParam = 0;
lParam = (LPARAM) (const LPLVITEM) pitem;
Brandon Parker at 2007-11-10 8:44:40 >