diff --git a/XgDictList.cpp b/XgDictList.cpp index 36a1ed8..5f3e945 100644 --- a/XgDictList.cpp +++ b/XgDictList.cpp @@ -71,10 +71,36 @@ void XgDictList_ReloadList(HWND hwnd) item.iItem = iItem; item.iSubItem = 0; ListView_InsertItem(hwndLst1, &item); + item.iItem = iItem; item.iSubItem = 1; item.pszText = const_cast(entry.m_friendly_name.c_str()); ListView_SetItem(hwndLst1, &item); + + WIN32_FIND_DATAW find; + HANDLE hFind = ::FindFirstFileW(entry.m_filename.c_str(), &find); + ::FindClose(hFind); + + WCHAR szText[32]; + item.iItem = iItem; + item.iSubItem = 2; + if (hFind == INVALID_HANDLE_VALUE) + { + StringCchCopyW(szText, _countof(szText), L"N/A"); + } + else + { + FILETIME ftLocal; + ::FileTimeToLocalFileTime(&find.ftLastWriteTime, &ftLocal); + SYSTEMTIME st; + ::FileTimeToSystemTime(&ftLocal, &st); + StringCchPrintfW(szText, _countof(szText), L"%04d-%02d-%02d", + st.wYear, st.wMonth, st.wDay); + item.pszText = szText; + } + item.pszText = szText; + ListView_SetItem(hwndLst1, &item); + ++iItem; } @@ -150,10 +176,15 @@ XgDictListDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) column.pszText = XgLoadStringDx1(IDS_FILENAME); column.cx = 200; ListView_InsertColumn(hwndLst1, 0, &column); + column.pszText = XgLoadStringDx1(IDS_DISPLAYNAME); column.cx = 250; ListView_InsertColumn(hwndLst1, 1, &column); + column.pszText = XgLoadStringDx1(IDS_UPDATEDDATE); + column.cx = 90; + ListView_InsertColumn(hwndLst1, 2, &column); + // イメージリストを設定。 HIMAGELIST himl = XgDictList_CreateRadioButtonImageList(hwnd); ListView_SetImageList(hwndLst1, himl, LVSIL_STATE); diff --git a/lang/en_US.rc b/lang/en_US.rc index d4c346b..a4c6cc8 100644 --- a/lang/en_US.rc +++ b/lang/en_US.rc @@ -1824,6 +1824,7 @@ STRINGTABLE IDS_FITWHOLE, "Fit whole" IDS_FILENAME, "Filename" IDS_DISPLAYNAME, "Display Name" + IDS_UPDATEDDATE, "Updated Date" IDS_TT_NEW, "New crossword" IDS_TT_GENERATE, "Generate crossword" IDS_TT_OPEN, "Open crossword" diff --git a/lang/ja_JP.rc b/lang/ja_JP.rc index 3213c57..0c12460 100644 --- a/lang/ja_JP.rc +++ b/lang/ja_JP.rc @@ -1828,6 +1828,7 @@ STRINGTABLE IDS_FITWHOLE, "全体に合わせる" IDS_FILENAME, "ファイル名" IDS_DISPLAYNAME, "表示名" + IDS_UPDATEDDATE, "更新日" IDS_TT_NEW, "新規作成" IDS_TT_GENERATE, "問題を自動生成する" IDS_TT_OPEN, "問題を開く" diff --git a/resource.h b/resource.h index dbbe0ac..09697f4 100644 --- a/resource.h +++ b/resource.h @@ -254,6 +254,7 @@ #define IDS_FITWHOLE 331 #define IDS_FILENAME 332 #define IDS_DISPLAYNAME 333 +#define IDS_UPDATEDDATE 334 #define IDS_TT_NEW 10100 #define IDS_TT_GENERATE 10101 #define IDS_TT_OPEN 10102