aboutsummaryrefslogtreecommitdiff
path: root/c/datalistview.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-26 19:27:35 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-26 19:27:35 +0200
commit547cbe578dcdb5aa5cfdac1cdb327f92bad21219 (patch)
treedc41dc107559a3ac2c87669b3616d8a33d221180 /c/datalistview.cpp
parentdccea47e9bc322d654902a1db4fc52cbf6dd0cd7 (diff)
downloadEpisodeBrowser-547cbe578dcdb5aa5cfdac1cdb327f92bad21219.tar.gz
Remove ANSI compatibility.
Even though it is a fun challange in many ways, I think that, realistically, it is probably not worth the complexity. The Prolog backend isn't ANSI-compatible either.
Diffstat (limited to 'c/datalistview.cpp')
-rw-r--r--c/datalistview.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/c/datalistview.cpp b/c/datalistview.cpp
index a1bb255..e64f89a 100644
--- a/c/datalistview.cpp
+++ b/c/datalistview.cpp
@@ -19,13 +19,13 @@ DataListView::DataListView(const HWND hWndParent)
lvc.mask = LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM;
lvc.iSubItem = DLVSIKEY;
- lvc.pszText = (TCHAR*)TEXT("Key");
+ lvc.pszText = (wchar_t*)L"Key";
lvc.cx = Dpi(42);
ListView_InsertColumn(hWnd, DLVSIKEY, &lvc);
lvc.iSubItem = DLVSIVALUE;
- lvc.pszText = (TCHAR*)TEXT("Value");
+ lvc.pszText = (wchar_t*)L"Value";
lvc.cx = 500;
ListView_InsertColumn(hWnd, DLVSIVALUE, &lvc);
}
@@ -56,21 +56,21 @@ void DataListView::ShowEpisode(const int iEpisode)
Query q (NULL, PL_predicate("episode_datum", iArity, "episode_data"), t);
for (int i = 0; q.NextSolution(); i++) {
- std::basic_string<TCHAR> tstrKey;
- std::basic_string<TCHAR> tstrValue;
+ std::wstring wstrKey;
+ std::wstring wstrValue;
- if (!(PlGet(t+1, &tstrKey) && PlGet(t+2, &tstrValue)))
+ if (!(PlGet(t+1, &wstrKey) && PlGet(t+2, &wstrValue)))
continue;
lviKey.mask = LVIF_TEXT;
lviKey.iItem = i;
lviKey.iSubItem = 0;
- lviKey.pszText = tstrKey.data();
+ lviKey.pszText = wstrKey.data();
ListView_InsertItem(hWnd, &lviKey);
lviValue.iItem = i;
lviValue.iSubItem = 1;
- lviValue.pszText = tstrValue.data();
+ lviValue.pszText = wstrValue.data();
ListView_SetItem(hWnd, &lviValue);
}