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/episodelistview.cpp | |
parent | 70928745565b01f3fae0e32ea007266aa2e1edc5 (diff) | |
download | EpisodeBrowser-84c3dd3587e219caa80adc2070f0e9fe004c27bc.tar.gz |
Add m_hWndParent to ListView.
This avoids g_hWnd.
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r-- | c/episodelistview.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp index a126649..1a41986 100644 --- a/c/episodelistview.cpp +++ b/c/episodelistview.cpp @@ -13,7 +13,8 @@ extern DataListView *g_lpDlv; int CALLBACK ElvSort(LPARAM, LPARAM, LPARAM); -EpisodeListView::EpisodeListView() : ListView((HMENU)IDC_EPISODELISTVIEW, 0) +EpisodeListView::EpisodeListView(HWND hWndParent) + : ListView(hWndParent, (HMENU)IDC_EPISODELISTVIEW, 0) { LVCOLUMN lvc; @@ -129,12 +130,11 @@ LRESULT EpisodeListView::HandleNotify(LPARAM lParam) } case NM_RCLICK: { - extern HWND g_hWnd; extern HMENU g_hPopupMenu; DWORD dwPos = GetMessagePos(); TrackPopupMenu(g_hPopupMenu, TPM_RIGHTBUTTON, LOWORD(dwPos), HIWORD(dwPos), 0, - g_hWnd, NULL); + m_hWndParent, NULL); break; } } |