summaryrefslogtreecommitdiff
path: root/plugins/Alarms
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/Alarms
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/Alarms')
-rw-r--r--plugins/Alarms/src/alarms.cpp2
-rw-r--r--plugins/Alarms/src/frame.cpp14
-rw-r--r--plugins/Alarms/src/options.cpp2
-rw-r--r--plugins/Alarms/src/stdafx.h1
4 files changed, 10 insertions, 9 deletions
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp
index 0465421ff2..9c28386d1d 100644
--- a/plugins/Alarms/src/alarms.cpp
+++ b/plugins/Alarms/src/alarms.cpp
@@ -19,6 +19,7 @@ There is no warranty.
TCHAR szGamePrefix[] = COMMANDPREFIX;
+CLIST_INTERFACE *pcli;
HINSTANCE hInst;
int hLangpack;
@@ -151,6 +152,7 @@ static int MainDeInit(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
// ensure datetime picker is loaded
INITCOMMONCONTROLSEX ccx;
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp
index c82ce4e96c..f29af0713d 100644
--- a/plugins/Alarms/src/frame.cpp
+++ b/plugins/Alarms/src/frame.cpp
@@ -264,7 +264,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
}
else if (!IsWindowVisible(hwnd) && count > 0) {
// we have reminders - show if not linked to clist or if clist is visible
- if ((!options.hide_with_clist && FrameIsFloating()) || IsWindowVisible((HWND)CallService(MS_CLUI_GETHWND, 0, 0))) {
+ if ((!options.hide_with_clist && FrameIsFloating()) || IsWindowVisible(pcli->hwndContactList)) {
CallService(MS_CLIST_FRAMES_SHFRAME, (WPARAM)frame_id, 0);
CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)frame_id, FU_FMREDRAW | FU_FMPOS);
}
@@ -275,7 +275,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
SetReminderFrameVisible(false);
else if (!IsWindowVisible(hwnd) && count > 0)
// we have reminders - show if not linked to clist or if clist is visible
- if (!options.hide_with_clist || IsWindowVisible((HWND)CallService(MS_CLUI_GETHWND, 0, 0)))
+ if (!options.hide_with_clist || IsWindowVisible(pcli->hwndContactList))
SetReminderFrameVisible(true);
}
}
@@ -320,14 +320,14 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
SendMessage(hwnd, WMU_FILL_LIST, 0, 0);
else if (wParam == ID_FRAME_SHOWHIDE_TIMER && options.hide_with_clist) { // link show/hide with clist
// hide if we're visible and clist isn't (possible only when floating if frames are present)
- if (!IsWindowVisible((HWND)CallService(MS_CLUI_GETHWND, 0, 0)) && IsWindowVisible(hwnd)) {
+ if (!IsWindowVisible(pcli->hwndContactList) && IsWindowVisible(hwnd)) {
if (ServiceExists(MS_CLIST_FRAMES_SHFRAME))
CallService(MS_CLIST_FRAMES_SHFRAME, (WPARAM)frame_id, 0);
else
SetReminderFrameVisible(false);
}
// we're not visible but clist is - show depending on hide_with_clist and auto_showhide options
- if (!IsWindowVisible(hwnd) && IsWindowVisible((HWND)CallService(MS_CLUI_GETHWND, 0, 0))) {
+ if (!IsWindowVisible(hwnd) && IsWindowVisible(pcli->hwndContactList)) {
// if not auto show/hide, show (reminders or not) if we're not visible and the clist is
// otherwise, show only if there are reminders
int count = SendMessage(hwnd_list, LB_GETCOUNT, 0, 0);
@@ -502,7 +502,7 @@ int CreateFrame()
if (ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
hwnd_plugin = CreateWindow(_T("AlarmsFrame"), TranslateT("Alarms"),
WS_CHILD | WS_CLIPCHILDREN,
- 0,0,10,10, (HWND)CallService(MS_CLUI_GETHWND, 0, 0), NULL,hInst,NULL);
+ 0,0,10,10, pcli->hwndContactList, NULL,hInst,NULL);
CLISTFrame Frame = { sizeof(CLISTFrame) };
Frame.tname = TranslateT("Alarms");
@@ -528,7 +528,7 @@ int CreateFrame()
hwnd_frame = CreateWindowEx(WS_EX_TOOLWINDOW, _T("AlarmsFrameContainer"), TranslateT("Alarms"),
(WS_POPUPWINDOW | WS_THICKFRAME | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN) & ~WS_VISIBLE,
- 0,0,200,100, (HWND)CallService(MS_CLUI_GETHWND, 0, 0), NULL,hInst,NULL);
+ 0,0,200,100, pcli->hwndContactList, NULL,hInst,NULL);
//0,0,200,100, GetDesktopWindow(), NULL,hInst,NULL);
hwnd_plugin = CreateWindow(_T("AlarmsFrame"), TranslateT("Alarms"),
@@ -552,7 +552,7 @@ int CreateFrame()
if (!options.auto_showhide) {
if (options.hide_with_clist) {
- if (IsWindowVisible((HWND)CallService(MS_CLUI_GETHWND, 0, 0))) {
+ if (IsWindowVisible(pcli->hwndContactList)) {
ShowWindow(hwnd_frame, SW_SHOW);
RefreshReminderFrame();
}
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp
index b4fbbc4f18..1f7ac9418c 100644
--- a/plugins/Alarms/src/options.cpp
+++ b/plugins/Alarms/src/options.cpp
@@ -1187,9 +1187,7 @@ INT_PTR NewAlarmMenuFunc(WPARAM, LPARAM)
new_alarm->id = next_alarm_id++;
GetPluginTime(&new_alarm->time);
- //New((HWND)CallService(MS_CLUI_GETHWND, 0, 0), *new_alarm, false);
New(GetDesktopWindow(), *new_alarm, false);
-
return 0;
}
diff --git a/plugins/Alarms/src/stdafx.h b/plugins/Alarms/src/stdafx.h
index dc0eac1ba0..0bc8575e9d 100644
--- a/plugins/Alarms/src/stdafx.h
+++ b/plugins/Alarms/src/stdafx.h
@@ -17,6 +17,7 @@
#include <m_idle.h>
#include <m_clui.h>
#include <m_cluiframes.h>
+#include <m_clistint.h>
#include <m_fontservice.h>
#include <m_icolib.h>
#include <win2k.h>