From eb7709d8617bec27349eebb43e8941b3aaaf453e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 26 Aug 2022 03:17:09 +0200 Subject: Use FunctionW names explicitly instead of macros. It's uglier, but it makes Visual Studio show better tooltips. --- c/listview.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'c/listview.cpp') diff --git a/c/listview.cpp b/c/listview.cpp index 9ca088c..41f68a7 100644 --- a/c/listview.cpp +++ b/c/listview.cpp @@ -14,7 +14,7 @@ ListView::ListView(const HWND hWndParent, const HMENU hMenu, const DWORD dwStyle extern HFONT g_hfNormal; m_hWndParent = hWndParent; - hWnd = Require(CreateWindowEx( + hWnd = Require(CreateWindowExW( WS_EX_CLIENTEDGE, WC_LISTVIEW, L"", @@ -24,9 +24,9 @@ ListView::ListView(const HWND hWndParent, const HMENU hMenu, const DWORD dwStyle m_proc0 = reinterpret_cast(SetWindowLongPtr( hWnd, GWLP_WNDPROC, reinterpret_cast(::WndProc))); - Require(SetProp(hWnd, L"this", reinterpret_cast(this))); + Require(SetPropW(hWnd, L"this", reinterpret_cast(this))); ListView_SetExtendedListViewStyle(hWnd, LVS_EX_FULLROWSELECT|LVS_EX_DOUBLEBUFFER); - SendMessage(hWnd, WM_SETFONT, reinterpret_cast(g_hfNormal), MAKELPARAM(FALSE, 0)); + SendMessageW(hWnd, WM_SETFONT, reinterpret_cast(g_hfNormal), MAKELPARAM(FALSE, 0)); } int ListView::Height() @@ -56,7 +56,7 @@ void ListView::UpdateTheme(const bool bThemeActive) SetWindowTheme(hWnd, theme, nullptr); /* Hide focus rectangles. */ - SendMessage(hWnd, WM_UPDATEUISTATE, MAKEWPARAM(action, UISF_HIDEFOCUS), 0); + SendMessageW(hWnd, WM_UPDATEUISTATE, MAKEWPARAM(action, UISF_HIDEFOCUS), 0); } LRESULT CALLBACK ListView::WndProc(const HWND hWnd, const UINT uMsg, @@ -87,7 +87,7 @@ LRESULT CALLBACK WndProc(const HWND hWnd, const UINT uMsg, const WPARAM wParam, ListView* const lv = reinterpret_cast(GetProp(hWnd, L"this")); if (uMsg == WM_DESTROY) - RemoveProp(hWnd, L"this"); + RemovePropW(hWnd, L"this"); return lv? lv->WndProc(hWnd, uMsg, wParam, lParam): FALSE; } -- cgit v1.2.3