summaryrefslogtreecommitdiff
path: root/plugins/Popup
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-09-26 19:16:12 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-09-26 19:16:12 +0300
commitc5dc28ec2272a865ef2f28fd7ab151b55517fedf (patch)
treed751f3e869c66371b8f1d65480b39c2997ba6e62 /plugins/Popup
parentdc2a4dc50d6cc3e7bd513122756dd39141d7887e (diff)
more clipboard shit removed
Diffstat (limited to 'plugins/Popup')
-rw-r--r--plugins/Popup/src/popup_wnd2.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp
index ded818c45f..57f77f0121 100644
--- a/plugins/Popup/src/popup_wnd2.cpp
+++ b/plugins/Popup/src/popup_wnd2.cpp
@@ -952,19 +952,8 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara
case ACT_DEF_COPY:
if (m_lptzText || m_lptzTitle) {
- CMStringW tszText(FORMAT, L"%s\n\n%s",
- (m_lptzTitle) ? m_lptzTitle : L"",
- (m_lptzText) ? m_lptzText : L"");
-
- if (OpenClipboard(m_hwnd)) {
- EmptyClipboard();
- HGLOBAL clipbuffer = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, (tszText.GetLength() + 1) * sizeof(wchar_t));
- wchar_t *buffer = (wchar_t *)GlobalLock(clipbuffer);
- mir_wstrcpy(buffer, tszText);
- GlobalUnlock(clipbuffer);
- SetClipboardData(CF_UNICODETEXT, clipbuffer);
- CloseClipboard();
- }
+ CMStringW tszText(FORMAT, L"%s\n\n%s", (m_lptzTitle) ? m_lptzTitle : L"", (m_lptzText) ? m_lptzText : L"");
+ Utils_ClipboardCopy(tszText);
}
PUDeletePopup(m_hwnd);
break;