From 547cbe578dcdb5aa5cfdac1cdb327f92bad21219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 26 Jul 2022 19:27:35 +0200 Subject: 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. --- c/datalistview.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'c/datalistview.cpp') 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 tstrKey; - std::basic_string 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); } -- cgit v1.2.3