summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/chat/window.cpp')
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 6916828dd8..b65c6b9c76 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -2647,16 +2647,7 @@ LABEL_SHOWWINDOW:
CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)tr.lpstrText);
break;
case ID_COPY:
- if (!OpenClipboard(hwndDlg))
- break;
- EmptyClipboard();
- {
- HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, sizeof(TCHAR) * (mir_tstrlen(tr.lpstrText) + 1));
- mir_tstrcpy((TCHAR*)GlobalLock(hData), tr.lpstrText);
- GlobalUnlock(hData);
- SetClipboardData(CF_UNICODETEXT, hData);
- }
- CloseClipboard();
+ Utils::CopyToClipBoard(tr.lpstrText, hwndDlg);
SetFocus(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE));
break;
}