From 3f842c733568aa9068aa83fad52540eb98f334b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 20 Jul 2022 20:25:59 +0200 Subject: Simplify require, prefer. --- c/listview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'c/listview.cpp') diff --git a/c/listview.cpp b/c/listview.cpp index 752ebcb..319433a 100644 --- a/c/listview.cpp +++ b/c/listview.cpp @@ -13,15 +13,15 @@ ListView::ListView(const HWND hWndParent, const HMENU hMenu, const DWORD dwStyle { m_hWndParent = hWndParent; m_bHeader = !(dwStyle & LVS_NOCOLUMNHEADER); - hWnd = require( + hWnd = require(CreateWindowEx( WS_EX_CLIENTEDGE, WC_LISTVIEW, TEXT(""), dwStyle|WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP|LVS_REPORT|LVS_SHOWSELALWAYS, 0, 0, 0, 0, - m_hWndParent, hMenu, GetModuleHandle(NULL), this); + m_hWndParent, hMenu, GetModuleHandle(NULL), this)); - if (require(hWnd, TEXT("this"), (HANDLE)this)) + if (require(SetProp(hWnd, TEXT("this"), (HANDLE)this))) m_prevProc = (WNDPROC)SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)::WndProc); -- cgit v1.2.3