diff options
author | George Hazan <george.hazan@gmail.com> | 2013-05-15 13:04:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-05-15 13:04:57 +0000 |
commit | 6f7e22b45b07f125320129fa3619d786bfebe87e (patch) | |
tree | 814548ebdfebbf91e857cdc147a59b9433e80e55 /plugins/Scriver/src | |
parent | f5181037fb93cebe849b625e5759f60192d406e2 (diff) |
MS_MSG_SETSTATUSTEXT for Scriver
git-svn-id: http://svn.miranda-ng.org/main/trunk@4658 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src')
-rw-r--r-- | plugins/Scriver/src/msgs.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 97ba638b7e..3e775f2ac6 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -322,13 +322,13 @@ static INT_PTR GetWindowData(WPARAM wParam, LPARAM lParam) {
MessageWindowInputData *mwid = (MessageWindowInputData*)wParam;
MessageWindowData *mwd = (MessageWindowData*)lParam;
- HWND hwnd;
if (mwid == NULL || mwd == NULL) return 1;
if (mwid->cbSize != sizeof(MessageWindowInputData) || mwd->cbSize != sizeof(SrmmWindowData)) return 1;
if (mwid->hContact == NULL) return 1;
if (mwid->uFlags != MSG_WINDOW_UFLAG_MSG_BOTH) return 1;
- hwnd = WindowList_Find(g_dat.hMessageWindowList, mwid->hContact);
+
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, mwid->hContact);
if (hwnd == NULL)
hwnd = SM_FindWindowByContact(mwid->hContact);
mwd->uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
@@ -338,6 +338,22 @@ static INT_PTR GetWindowData(WPARAM wParam, LPARAM lParam) return 0;
}
+static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
+{
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HANDLE)wParam);
+ if (hwnd == NULL)
+ hwnd = SM_FindWindowByContact((HANDLE)wParam);
+ if (hwnd == NULL)
+ return 1;
+
+ SrmmWindowData *dat = (SrmmWindowData*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ if (dat == NULL || dat->parent == NULL)
+ return 1;
+
+ SendMessage(dat->parent->hwndStatus, SB_SETTEXT, 0, lParam);
+ return 0;
+}
+
static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
HANDLE hContact = (HANDLE)wParam;
@@ -531,6 +547,7 @@ int OnLoadModule(void) CreateServiceFunction(MS_MSG_GETWINDOWAPI, GetWindowAPI);
CreateServiceFunction(MS_MSG_GETWINDOWCLASS, GetWindowClass);
CreateServiceFunction(MS_MSG_GETWINDOWDATA, GetWindowData);
+ CreateServiceFunction(MS_MSG_SETSTATUSTEXT, SetStatusText);
CreateServiceFunction("SRMsg/ReadMessage", ReadMessageCommand);
CreateServiceFunction("SRMsg/TypingMessage", TypingMessageCommand);
|