summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype/src/skype_utils.cpp')
-rw-r--r--protocols/Skype/src/skype_utils.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp
index 491d32d68e..fbb5fb5f02 100644
--- a/protocols/Skype/src/skype_utils.cpp
+++ b/protocols/Skype/src/skype_utils.cpp
@@ -531,3 +531,15 @@ bool CSkypeProto::FileExists(wchar_t *path)
return false;
}
+void CSkypeProto::CopyToClipboard(const wchar_t *text)
+{
+ HWND hwnd = (HWND)CallService(MS_CLUI_GETHWND, 0, 0);
+ ::OpenClipboard(hwnd);
+ ::EmptyClipboard();
+ HGLOBAL hMem = ::GlobalAlloc(GMEM_MOVEABLE, sizeof(TCHAR)*(::lstrlen(text)+1));
+ TCHAR *s = (TCHAR *)::GlobalLock(hMem);
+ ::lstrcpy(s, text);
+ ::GlobalUnlock(hMem);
+ ::SetClipboardData(CF_UNICODETEXT, hMem);
+ ::CloseClipboard();
+} \ No newline at end of file