From 06bb38dfa357a731e16980d03ab100b84e5cb989 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 25 Jun 2015 21:53:56 +0000 Subject: MS_CLUI_GETHWND & MS_CLUI_GETHWNDTREE replaced with pcli->hwndContactList & pcli->hwndContactTree respectively git-svn-id: http://svn.miranda-ng.org/main/trunk@14386 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CmdLine/src/CmdLine.cpp | 8 +++----- plugins/CmdLine/src/mimcmd_handlers.cpp | 9 ++++----- plugins/CmdLine/src/stdafx.h | 1 + 3 files changed, 8 insertions(+), 10 deletions(-) (limited to 'plugins/CmdLine/src') diff --git a/plugins/CmdLine/src/CmdLine.cpp b/plugins/CmdLine/src/CmdLine.cpp index a8224f5b49..1b281cff61 100644 --- a/plugins/CmdLine/src/CmdLine.cpp +++ b/plugins/CmdLine/src/CmdLine.cpp @@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. char ModuleName[] = "CmdLine"; HINSTANCE hInstance; int hLangpack; +CLIST_INTERFACE *pcli; PLUGININFOEX pluginInfo = { sizeof(PLUGININFOEX), @@ -46,14 +47,12 @@ extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD) extern "C" int __declspec(dllexport) Load(void) { mir_getLP(&pluginInfo); + mir_getCLI(); if (InitServer()) - { MessageBox(0, TranslateT("Could not initialize CmdLine plugin property"), TranslateT("Error"), MB_ICONEXCLAMATION | MB_OK); - } HookEvents(); - return 0; } @@ -64,7 +63,6 @@ extern "C" int __declspec(dllexport) Unload() UnhookEvents(); DestroyServer(); - return 0; } @@ -72,4 +70,4 @@ bool WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) { hInstance = hinstDLL; return TRUE; -} \ No newline at end of file +} diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index 7c18db81fd..75a6aee74c 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -550,8 +550,7 @@ void HandleClistCommand(PCommand command, TArgument *argv, int argc, PReply repl { case 2: { - HWND hClist = (HWND) CallService(MS_CLUI_GETHWND, 0, 0); - int state = IsWindowVisible(hClist); + int state = IsWindowVisible(pcli->hwndContactList); Set2StateReply(reply, state, 0, LPGEN("Contact list is currently shown."), "", LPGEN("Contact list is currently hidden."), ""); return; @@ -560,7 +559,7 @@ void HandleClistCommand(PCommand command, TArgument *argv, int argc, PReply repl case 3: { int state = 0; - HWND hClist = (HWND) CallService(MS_CLUI_GETHWND, 0, 0); + HWND hClist = pcli->hwndContactList; switch (Get2StateValue(argv[2])) { @@ -617,7 +616,7 @@ void HandleQuitCommand(PCommand command, TArgument *argv, int argc, PReply reply CallService("CloseAction", 0, 0); //try another quit method - HWND hWndMiranda = (HWND)CallService(MS_CLUI_GETHWND, 0, 0); + HWND hWndMiranda = pcli->hwndContactList; PostMessage(hWndMiranda, WM_COMMAND, ID_ICQ_EXIT, 0); reply->code = MIMRES_SUCCESS; @@ -636,7 +635,7 @@ void HandleQuitCommand(PCommand command, TArgument *argv, int argc, PReply reply CallService("CloseAction", 0, 0); //try another quit method - HWND hWndMiranda = (HWND)CallService(MS_CLUI_GETHWND, 0, 0); + HWND hWndMiranda = pcli->hwndContactList; PostMessage(hWndMiranda, WM_COMMAND, ID_ICQ_EXIT, 0); reply->code = MIMRES_SUCCESS; diff --git a/plugins/CmdLine/src/stdafx.h b/plugins/CmdLine/src/stdafx.h index 58df317ad2..2394d55fa8 100644 --- a/plugins/CmdLine/src/stdafx.h +++ b/plugins/CmdLine/src/stdafx.h @@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "newpluginapi.h" #include "m_database.h" #include "m_clist.h" +#include "m_clistint.h" #include "m_clui.h" #include "m_contacts.h" #include "m_langpack.h" -- cgit v1.2.3