From 160870dcf08dce46b6433670ebc0321ad0679243 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 4 May 2014 21:52:44 +0000 Subject: missing check for subs added git-svn-id: http://svn.miranda-ng.org/main/trunk@9131 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdmsg/src/msgs.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core/stdmsg') 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); } -- cgit v1.2.3