summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-05-04 21:52:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-05-04 21:52:44 +0000
commit160870dcf08dce46b6433670ebc0321ad0679243 (patch)
tree7abb922065ef93fd7dc5357f4c2c9e2a05b5ef7c /src/core
parentf7a344dab108224cc2dcb1e39eba5b41efcadefd (diff)
missing check for subs added
git-svn-id: http://svn.miranda-ng.org/main/trunk@9131 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdmsg/src/msgs.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 0aa012ecf5..24e0b2da8b 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -108,6 +108,9 @@ INT_PTR SendMessageCmd(MCONTACT hContact, char* msg, int isWchar)
if (!szProto || (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
return 1;
+ if (db_mc_isSub(hContact))
+ hContact = db_mc_getMeta(hContact);
+
HWND hwnd;
if (hwnd = WindowList_Find(g_dat.hMessageWindowList, hContact)) {
if (msg) {
@@ -115,7 +118,7 @@ INT_PTR SendMessageCmd(MCONTACT hContact, char* msg, int isWchar)
hEdit = GetDlgItem(hwnd, IDC_MESSAGE);
SendMessage(hEdit, EM_SETSEL, -1, SendMessage(hEdit, WM_GETTEXTLENGTH, 0, 0));
if (isWchar)
- SendMessage(hEdit, EM_REPLACESEL, FALSE, (LPARAM)msg);
+ SendMessageW(hEdit, EM_REPLACESEL, FALSE, (LPARAM)msg);
else
SendMessageA(hEdit, EM_REPLACESEL, FALSE, (LPARAM)msg);
}