Code:
int DumpCompiler(HWND hwnd, char *pStr) {
LVITEM item = {0};
item.mask = LVIF_TEXT;
item.pszText = pStr;
item.iItem = ListView_GetItemCount(hwnd);
ListView_InsertItem(hwnd, &item);
return ListView_EnsureVisible(hwnd, item.iItem, 0);
}
This is how I create the ListView
Code:
INITCOMMONCONTROLSEX iccx;
iccx.dwSize = sizeof(INITCOMMONCONTROLSEX);
iccx.dwICC = ICC_BAR_CLASSES|ICC_LISTVIEW_CLASSES;
InitCommonControlsEx(&iccx);
hCompiler = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, NULL, WS_CHILD|WS_VISIBLE|LVS_REPORT|LVS_SINGLESEL|LVS_NOCOLUMNHEADER|LVS_SORTDESCENDING, 5, 280, 0, 0, hWnd, HMENU(IDC_COMPILER), hInstance, 0);
ListView_SetBkColor(hCompiler, RGB(0,0,0));
ListView_SetTextColor(hCompiler, RGB(0,255,0));
ListView_SetTextBkColor(hCompiler, RGB(0,0,0));
When I use:
Code:
DumpCompiler(hCompiler, "Hola");
Nothing happens...any ideas?