summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-25 21:53:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-25 21:53:56 +0000
commit06bb38dfa357a731e16980d03ab100b84e5cb989 (patch)
tree686bd8edc9e71087bb943ec3fe6dbb5193d09247 /plugins/TopToolBar/src
parentcc6abc9eed963a2659c121ddec136f1ab4256535 (diff)
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
Diffstat (limited to 'plugins/TopToolBar/src')
-rw-r--r--plugins/TopToolBar/src/InternalButtons.cpp6
-rw-r--r--plugins/TopToolBar/src/common.h1
-rw-r--r--plugins/TopToolBar/src/main.cpp2
-rw-r--r--plugins/TopToolBar/src/toolbarwnd.cpp2
4 files changed, 7 insertions, 4 deletions
diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp
index fb7566729d..347bbc9620 100644
--- a/plugins/TopToolBar/src/InternalButtons.cpp
+++ b/plugins/TopToolBar/src/InternalButtons.cpp
@@ -67,7 +67,7 @@ INT_PTR TTBInternalMainMenuButt(WPARAM wParam, LPARAM lParam)
POINT pt;
GetCursorPos(&pt);
- TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, (HWND)CallService(MS_CLUI_GETHWND, 0, 0), NULL);
+ TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
return 0;
}
@@ -77,7 +77,7 @@ INT_PTR TTBInternalStatusMenuButt(WPARAM wParam, LPARAM lParam)
POINT pt;
GetCursorPos(&pt);
- TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, (HWND)CallService(MS_CLUI_GETHWND, 0, 0), NULL);
+ TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, NULL);
return 0;
}
@@ -106,7 +106,7 @@ INT_PTR TTBInternalShowHideOffline(WPARAM wParam, LPARAM lParam)
void InitInternalButtons()
{
- hwndContactTree = (HWND)CallService(MS_CLUI_GETHWNDTREE, 0, 0);
+ hwndContactTree = pcli->hwndContactTree;
CreateServiceFunction(TTBI_GROUPSHOWHIDE, TTBInternalGroupShowHide);
CreateServiceFunction(TTBI_SOUNDSONOFF, TTBInternalSoundsOnOff);
diff --git a/plugins/TopToolBar/src/common.h b/plugins/TopToolBar/src/common.h
index 5819403c81..e5e4ac6e1e 100644
--- a/plugins/TopToolBar/src/common.h
+++ b/plugins/TopToolBar/src/common.h
@@ -15,6 +15,7 @@
#include <m_cluiframes.h>
#include <m_clui.h>
#include <m_clc.h>
+#include <m_clistint.h>
#include <m_findadd.h>
#include <m_langpack.h>
#include <m_options.h>
diff --git a/plugins/TopToolBar/src/main.cpp b/plugins/TopToolBar/src/main.cpp
index a651684e1f..c30ee22557 100644
--- a/plugins/TopToolBar/src/main.cpp
+++ b/plugins/TopToolBar/src/main.cpp
@@ -1,6 +1,7 @@
#include "common.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
@@ -29,6 +30,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD miranda
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
LoadToolbarModule();
return 0;
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp
index 9f85e57dac..bce16c1b42 100644
--- a/plugins/TopToolBar/src/toolbarwnd.cpp
+++ b/plugins/TopToolBar/src/toolbarwnd.cpp
@@ -244,7 +244,7 @@ INT_PTR OnEventFire(WPARAM wParam, LPARAM lParam)
CallService(MS_SYSTEM_REMOVEWAIT, wParam, 0);
CloseHandle((HANDLE)wParam);
- HWND parent = (HWND)CallService(MS_CLUI_GETHWND, 0, 0);
+ HWND parent = pcli->hwndContactList;
if (parent == NULL) // no clist, no buttons
return -1;