diff options
Diffstat (limited to 'plugins/NewXstatusNotify/src/utils.cpp')
-rw-r--r-- | plugins/NewXstatusNotify/src/utils.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/NewXstatusNotify/src/utils.cpp b/plugins/NewXstatusNotify/src/utils.cpp index a86f7e80bc..08e61f1dd2 100644 --- a/plugins/NewXstatusNotify/src/utils.cpp +++ b/plugins/NewXstatusNotify/src/utils.cpp @@ -21,6 +21,29 @@ #include "common.h"
+
+// From NewEventNotify :-)
+bool CheckMsgWnd(MCONTACT hContact)
+{
+ MessageWindowInputData mwid;
+ mwid.cbSize = sizeof(MessageWindowInputData);
+ mwid.hContact = hContact;
+ mwid.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
+
+ MessageWindowData mwd;
+ mwd.cbSize = sizeof(MessageWindowData);
+ mwd.hContact = hContact;
+ if (CallService(MS_MSG_GETWINDOWDATA, (WPARAM) &mwid, (LPARAM) &mwd) != NULL)
+ return false;
+
+ if (mwd.hwndWindow != NULL && (mwd.uState & MSG_WINDOW_STATE_EXISTS))
+ return true;
+
+ return false;
+}
+
+
+
TCHAR *db2t(DBVARIANT *dbv)
{
TCHAR *buff;
|