diff options
author | George Hazan <ghazan@miranda.im> | 2022-09-26 18:23:52 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-09-26 18:23:52 +0300 |
commit | 30a9e9e370aa9aff9f64158aa0942b471621a7ef (patch) | |
tree | 013f47dfcc748e7a816eb3b59a9ee852d34de0ad /plugins/Scriver | |
parent | cb0412427ffb4819f2026906f259f4a2dd3ef177 (diff) |
Utils_ClipboardCopy - system-wide helper for writing text to clipboard
Diffstat (limited to 'plugins/Scriver')
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index be104cf8d5..ee2af9e908 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -458,15 +458,7 @@ void CMsgDialog::onClick_UserMenu(CCtrlButton *pButton) {
if (GetKeyState(VK_SHIFT) & 0x8000) { // copy user name
ptrW id(Contact::GetInfo(CNF_UNIQUEID, m_hContact, m_szProto));
- if (!OpenClipboard(m_hwnd) || !mir_wstrlen(id))
- return;
-
- EmptyClipboard();
- HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, 2*mir_wstrlen(id) + 1);
- mir_wstrcpy((LPWSTR)GlobalLock(hData), id);
- GlobalUnlock(hData);
- SetClipboardData(CF_UNICODETEXT, hData);
- CloseClipboard();
+ Utils_ClipboardCopy(id);
}
else {
RECT rc;
|