diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-20 14:31:28 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-20 14:32:04 +0200 |
commit | 400d4d12b7a70b81629a119844e7d5ad16aa6012 (patch) | |
tree | 162bf5d9c64fdbedbbcbbea0586de2775f417d02 /c/listview.cpp | |
parent | 79d4fa6d9a79295b747eedcc17b4de6ccdde7e37 (diff) | |
download | EpisodeBrowser-400d4d12b7a70b81629a119844e7d5ad16aa6012.tar.gz |
Improve ANSI compatibility.
This improves upon 79d4fa6.
Actually, ANSI compatibility may be desirable, as recent work has been
done to make the A versions of Windows API functions work with UTF-8.
Diffstat (limited to 'c/listview.cpp')
-rw-r--r-- | c/listview.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/c/listview.cpp b/c/listview.cpp index 3ad66f5..752ebcb 100644 --- a/c/listview.cpp +++ b/c/listview.cpp @@ -41,25 +41,23 @@ int ListView::Height(int bHeader) void ListView::UpdateTheme(const BOOL bThemeActive) { DWORD dwStyle; - const TCHAR* tszTheme; + const wchar_t* wszTheme; WORD wAction; extern int g_bThemes; if (!g_bThemes) return; if (bThemeActive) { dwStyle = LVS_EX_DOUBLEBUFFER; - tszTheme = TEXT("Explorer"); + wszTheme = L"Explorer"; wAction = UIS_SET; } else { dwStyle = 0; - tszTheme = NULL; + wszTheme = NULL; wAction = UIS_CLEAR; } -#ifdef UNICODE /* Use modern "Explorer" theme. */ - SetWindowTheme(hWnd, tszTheme, NULL); -#endif + SetWindowTheme(hWnd, wszTheme, NULL); /* The modern theme requires double buffering. */ ListView_SetExtendedListViewStyleEx(hWnd, LVS_EX_DOUBLEBUFFER, dwStyle); |