diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-16 01:00:20 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-16 01:00:20 +0200 |
commit | 84c3dd3587e219caa80adc2070f0e9fe004c27bc (patch) | |
tree | e73b7367e8a44dba66498ae7dc244cf49b269897 /c/listview.cpp | |
parent | 70928745565b01f3fae0e32ea007266aa2e1edc5 (diff) | |
download | EpisodeBrowser-84c3dd3587e219caa80adc2070f0e9fe004c27bc.tar.gz |
Add m_hWndParent to ListView.
This avoids g_hWnd.
Diffstat (limited to 'c/listview.cpp')
-rw-r--r-- | c/listview.cpp | 7 |
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)) |