aboutsummaryrefslogtreecommitdiff
path: root/c/listview.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-16 01:00:20 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-16 01:00:20 +0200
commit84c3dd3587e219caa80adc2070f0e9fe004c27bc (patch)
treee73b7367e8a44dba66498ae7dc244cf49b269897 /c/listview.cpp
parent70928745565b01f3fae0e32ea007266aa2e1edc5 (diff)
downloadEpisodeBrowser-84c3dd3587e219caa80adc2070f0e9fe004c27bc.tar.gz
Add m_hWndParent to ListView.
This avoids g_hWnd.
Diffstat (limited to 'c/listview.cpp')
-rw-r--r--c/listview.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/c/listview.cpp b/c/listview.cpp
index 4e9d754..0f4cbc1 100644
--- a/c/listview.cpp
+++ b/c/listview.cpp
@@ -7,20 +7,19 @@
#include "main.h"
extern HFONT g_hfNormal;
-extern HWND g_hWnd;
static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
-ListView::ListView(HMENU hMenu, DWORD dwStyle)
+ListView::ListView(HWND hWndParent, HMENU hMenu, DWORD dwStyle)
{
+ m_hWndParent = hWndParent;
m_bHeader = !(dwStyle & LVS_NOCOLUMNHEADER);
-
m_hWnd = CreateWindowEx(
WS_EX_CLIENTEDGE,
WC_LISTVIEW,
TEXT(""),
dwStyle|WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP|LVS_REPORT|LVS_SHOWSELALWAYS,
0, 0, 0, 0,
- g_hWnd, hMenu, GetModuleHandle(NULL), this
+ m_hWndParent, hMenu, GetModuleHandle(NULL), this
);
if (SetProp(m_hWnd, TEXT("this"), (HANDLE)this))