From 9cf1444eb7888f2d942d220f938aa893396a8a1b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 18 Apr 2018 20:51:18 +0300 Subject: g_hInstance incapulated into PLUGIN<>, no need in the separate variable --- plugins/Weather/src/weather_popup.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/Weather/src/weather_popup.cpp') diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp index 32d0969307..d40cc5e99f 100644 --- a/plugins/Weather/src/weather_popup.cpp +++ b/plugins/Weather/src/weather_popup.cpp @@ -256,7 +256,7 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) SaveOptions(); // click actions - hMenu = LoadMenu(g_hInstance, MAKEINTRESOURCE(IDR_PMENU)); + hMenu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_PMENU)); hMenu1 = GetSubMenu(hMenu, 0); GetMenuString(hMenu1, opt.LeftClickAction, str, _countof(str), MF_BYCOMMAND); SetDlgItemText(hdlg, IDC_LeftClick, TranslateW(str)); @@ -330,7 +330,7 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) button = GetDlgItem(hdlg, IDC_RightClick); GetWindowRect(button, &pos); - hMenu = LoadMenu(g_hInstance, MAKEINTRESOURCE(IDR_PMENU)); + hMenu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_PMENU)); hMenu1 = GetSubMenu(hMenu, 0); TranslateMenu(hMenu1); SelectMenuItem(hMenu1, opt.RightClickAction); @@ -339,7 +339,7 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) opt.RightClickAction = ID; DestroyMenu(hMenu); - hMenu = LoadMenu(g_hInstance, MAKEINTRESOURCE(IDR_PMENU)); + hMenu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_PMENU)); hMenu1 = GetSubMenu(hMenu, 0); GetMenuString(hMenu1, opt.RightClickAction, str, _countof(str), MF_BYCOMMAND); SetDlgItemText(hdlg, IDC_RightClick, TranslateW(str)); @@ -351,7 +351,7 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) button = GetDlgItem(hdlg, IDC_LeftClick); GetWindowRect(button, &pos); - hMenu = LoadMenu(g_hInstance, MAKEINTRESOURCE(IDR_PMENU)); + hMenu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_PMENU)); hMenu1 = GetSubMenu(hMenu, 0); TranslateMenu(hMenu1); SelectMenuItem(hMenu1, opt.LeftClickAction); @@ -359,7 +359,7 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) if (ID) opt.LeftClickAction = ID; DestroyMenu(hMenu); - hMenu = LoadMenu(g_hInstance, MAKEINTRESOURCE(IDR_PMENU)); + hMenu = LoadMenu(g_plugin.getInst(), MAKEINTRESOURCE(IDR_PMENU)); hMenu1 = GetSubMenu(hMenu, 0); GetMenuString(hMenu1, opt.LeftClickAction, str, _countof(str), MF_BYCOMMAND); SetDlgItemText(hdlg, IDC_LeftClick, TranslateW(str)); -- cgit v1.2.3