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_mwin.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/Weather/src/weather_mwin.cpp') diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index 0775bcfff6..5b0eeee3d7 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -48,7 +48,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara data->hContact = (DWORD_PTR)((LPCREATESTRUCT)lParam)->lpCreateParams; data->hAvt = CreateWindow(AVATAR_CONTROL_CLASS, TEXT(""), WS_CHILD, - 0, 0, opt.AvatarSize, opt.AvatarSize, hwnd, nullptr, g_hInstance, nullptr); + 0, 0, opt.AvatarSize, opt.AvatarSize, hwnd, nullptr, g_plugin.getInst(), nullptr); if (data->hAvt) SendMessage(data->hAvt, AVATAR_SETCONTACT, 0, (LPARAM)data->hContact); break; @@ -238,7 +238,7 @@ static void addWindow(MCONTACT hContact) db_free(&dbv); HWND hWnd = CreateWindow(L"WeatherFrame", L"", WS_CHILD | WS_VISIBLE, - 0, 0, 10, 10, pcli->hwndContactList, nullptr, g_hInstance, (void*)hContact); + 0, 0, 10, 10, pcli->hwndContactList, nullptr, g_plugin.getInst(), (void*)hContact); WindowList_Add(hMwinWindowList, hWnd, hContact); CLISTFrame Frame = { 0 }; @@ -308,7 +308,7 @@ void InitMwin(void) wndclass.lpfnWndProc = wndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; - wndclass.hInstance = g_hInstance; + wndclass.hInstance = g_plugin.getInst(); wndclass.hIcon = nullptr; wndclass.hCursor = LoadCursor(nullptr, IDC_ARROW); wndclass.hbrBackground = nullptr; //(HBRUSH)(COLOR_3DFACE+1); @@ -362,7 +362,7 @@ void DestroyMwin(void) if (frameId) CallService(MS_CLIST_FRAMES_REMOVEFRAME, frameId, 0); } - UnregisterClass(L"WeatherFrame", g_hInstance); + UnregisterClass(L"WeatherFrame", g_plugin.getInst()); WindowList_Destroy(hMwinWindowList); UnhookEvent(hFontHook); } -- cgit v1.2.3