Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int iLastIndex = ListView_GetItemCount(hWndLV);
- LVITEM lvi;
- lvi.mask = LVIF_TEXT;
- lvi.cchTextMax = textMaxLen;
- lvi.iSubItem = 0;
- lvi.iItem = iLastIndex;
- std::wstring tmpName(item->name);
- lvi.pszText = &tmpName[0];
- if (ListView_InsertItem(hWndLV, &lvi) == -1)
- return FALSE;
- std::wstring tmpDate(item->date);
- std::wstringstream ss;
- ss << item->size;
- std::wstring str = ss.str();
- ListView_SetItemText(hWndLV, iLastIndex, 0, &tmpName[0]);
- ListView_SetItemText(hWndLV, iLastIndex, 1, &tmpDate[0]);
- ListView_SetItemText(hWndLV, iLastIndex, 2, (LPWSTR)str.c_str());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement