When I put this code under my WM_CREATE area, the listview is displayed as a big empty white client-edged box. Why is this not making the columns?
Code:
InitCommonControls();
CreateCtrl(WC_LISTVIEW, NULL, WS_VSCROLL, WS_EX_CLIENTEDGE, ID_LIST, 0, 0, 0, 0);
lvColumn.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH;
lvColumn.fmt = LVCFMT_LEFT;
lvColumn.cx = 100;
lvColumn.pszText = "File Name";
ListView_InsertColumn(GDI(ID_LIST), 0, &lvColumn);
ListView_Update(GDI(ID_LIST), 0);
lvColumn.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH;
lvColumn.fmt = LVCFMT_LEFT;
lvColumn.cx = 100;
lvColumn.pszText = "File Size";
ListView_InsertColumn(GDI(ID_LIST), 1, &lvColumn);
ListView_Update(GDI(ID_LIST), 1);
CreateCtrl() is a working macro I made. So is GDI(). And I have the program set the size of it under WM_SIZE, which is also working great. I have already tried it with and without the update calls.
EDIT:
I changed ListView_SetColumn() to ListView_InsertColumn() but it's still not working. Please help.
EDIT 2:
Okay, nevermind, I see now. I was under the impression that the "SysHeader32" class was a part of the "SysListView32" class. Sorry for the bunk thread.