There is a problem i cant figured out.
First, i insert three column in a listview control:
LVCOLUMN lvc;
lvc.mask = LVCF_WIDTH;
lvc.cx = 100;
::SendMessage(hwndList, LVM_INSERTCOLUMN, 0, (LPARAM)&lvc);
lvc.cx = 100;
::SendMessage(hwndList, LVM_INSERTCOLUMN, 1, (LPARAM)&lvc);
lvc.cx = 100;
::SendMessage(hwndList, LVM_INSERTCOLUMN, 2, (LPARAM)&lvc);
second, i want change the text of the column:
LVCOLUMN lvc = {0};
wchar_t buf[MAX_PATH];
lvc.mask = LVCF_TEXT;
lvc.pszText = buf;
g_LangMgr.GetString(IDS_USER, buf, MAX_PATH);int ret = ::SendMessage(hwndList, LVM_SETCOLUMN, 0, (LPARAM)&lvc);
although ret equals 1 which means ok, but the column text is not displayed. when i uncomment the code in the first code fragment, it worked ok, and i want know where?