diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-18 03:03:56 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-18 03:03:56 +0200 |
commit | 41745326d8440340a87b5179139b2915efe3715d (patch) | |
tree | 7ae465793cc80793efc5392b2628aebaf18819bd /c/listview.cpp | |
parent | 0531bf802017b7792b90270b6346b3c88ffcea70 (diff) | |
download | EpisodeBrowser-41745326d8440340a87b5179139b2915efe3715d.tar.gz |
Add Unicode support to Win32Error.
Diffstat (limited to 'c/listview.cpp')
-rw-r--r-- | c/listview.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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); |