aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.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/episodelistview.cpp
parent70928745565b01f3fae0e32ea007266aa2e1edc5 (diff)
downloadEpisodeBrowser-84c3dd3587e219caa80adc2070f0e9fe004c27bc.tar.gz
Add m_hWndParent to ListView.
This avoids g_hWnd.
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp6
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;
}
}