diff options
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)) |