diff options
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 5 |
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);
}
|