From b172c4bbc75cdad0e8ccd22292aa671ba43cac45 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 18 Apr 2018 18:14:33 +0300 Subject: PLUGIN<> to half-automatically calculate the dll's g_hInstance and pass it inside --- plugins/Weather/src/weather_opt.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Weather/src/weather_opt.cpp') diff --git a/plugins/Weather/src/weather_opt.cpp b/plugins/Weather/src/weather_opt.cpp index 8f4ec006ef..981b8e9f3e 100644 --- a/plugins/Weather/src/weather_opt.cpp +++ b/plugins/Weather/src/weather_opt.cpp @@ -483,7 +483,7 @@ static INT_PTR CALLBACK DlgProcText(HWND hdlg, UINT msg, WPARAM wParam, LPARAM l // display the menu button = GetDlgItem(hdlg, LOWORD(wParam)); GetWindowRect(button, &pos); - hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_TMMENU)); + hMenu = LoadMenu(g_hInstance, MAKEINTRESOURCE(IDR_TMMENU)); hMenu1 = GetSubMenu(hMenu, 0); TranslateMenu(hMenu1); switch (TrackPopupMenu(hMenu1, TPM_LEFTBUTTON | TPM_RETURNCMD, pos.left, pos.bottom, 0, hdlg, nullptr)) { @@ -511,7 +511,7 @@ static INT_PTR CALLBACK DlgProcText(HWND hdlg, UINT msg, WPARAM wParam, LPARAM l // left click action selection menu button = GetDlgItem(hdlg, IDC_RESET); GetWindowRect(button, &pos); - hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_TMENU)); + hMenu = LoadMenu(g_hInstance, MAKEINTRESOURCE(IDR_TMENU)); hMenu1 = GetSubMenu(hMenu, 0); TranslateMenu(hMenu1); switch (TrackPopupMenu(hMenu1, TPM_LEFTBUTTON | TPM_RETURNCMD, pos.left, pos.bottom, 0, hdlg, nullptr)) { @@ -571,7 +571,7 @@ static INT_PTR CALLBACK DlgProcText(HWND hdlg, UINT msg, WPARAM wParam, LPARAM l int OptInit(WPARAM wParam, LPARAM) { OPTIONSDIALOGPAGE odp = { 0 }; - odp.hInstance = hInst; + odp.hInstance = g_hInstance; // plugin options odp.position = 95600; -- cgit v1.2.3