Hi to all,
I created a list view window using
Code:
ListView = CreateWindowEx(WS_EX_CLIENTEDGE, "SysListView32", NULL, WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL,
rc.left+156, rc.top+INIT, 474, rc.bottom-40, hwnd, (HMENU)LISTVIEW32, GetModuleHandle(NULL), NULL);
SendMessage(ListView, WM_SETFONT, (WPARAM)hfDefault, MAKELPARAM(FALSE, 0));
InitListView(ListView);
Now InitListView seems not to draw the column headers i.e
Code:
void InitListView(HWND hwndLV)
{
LV_COLUMN lvc;
SendMessage(hwndLV, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
memset(&lvc, 0, sizeof(LV_COLUMN) );
lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
lvc.fmt = LVCFMT_LEFT;
// first column
int ColWidth = (INT) 90;
lvc.iSubItem = 0;
lvc.cx = ColWidth;
lvc.cchTextMax = 13;
lvc.pszText = "Computer Name";
ListView_InsertColumn(hwndLV, 0, &lvc);
// second column
ColWidth = (INT) 100;
lvc.iSubItem = 1;
lvc.cx = ColWidth;
lvc.cchTextMax = 10;
lvc.pszText = "IP Address";
ListView_InsertColumn(hwndLV, 1, &lvc);
}
The window turns up quite empty. Any Ideas?
Thanks alot