From 41745326d8440340a87b5179139b2915efe3715d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 18 Jul 2022 03:03:56 +0200 Subject: Add Unicode support to Win32Error. --- c/listview.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'c/listview.cpp') diff --git a/c/listview.cpp b/c/listview.cpp index 6c0185d..27dc7ac 100644 --- a/c/listview.cpp +++ b/c/listview.cpp @@ -21,6 +21,8 @@ ListView::ListView(const HWND hWndParent, const HMENU hMenu, const DWORD dwStyle 0, 0, 0, 0, m_hWndParent, hMenu, GetModuleHandle(NULL), this ); + if (!hWnd) throw Win32Error(GetLastError()); + if (SetProp(hWnd, TEXT("this"), (HANDLE)this)) m_prevProc = (WNDPROC)SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)::WndProc); -- cgit v1.2.3