summaryrefslogtreecommitdiff
path: root/plugins/Import/src/progress.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-09-26 18:23:52 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-09-26 18:23:52 +0300
commit30a9e9e370aa9aff9f64158aa0942b471621a7ef (patch)
tree013f47dfcc748e7a816eb3b59a9ee852d34de0ad /plugins/Import/src/progress.cpp
parentcb0412427ffb4819f2026906f259f4a2dd3ef177 (diff)
Utils_ClipboardCopy - system-wide helper for writing text to clipboard
Diffstat (limited to 'plugins/Import/src/progress.cpp')
-rw-r--r--plugins/Import/src/progress.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/plugins/Import/src/progress.cpp b/plugins/Import/src/progress.cpp
index d2037cad65..b602d0a655 100644
--- a/plugins/Import/src/progress.cpp
+++ b/plugins/Import/src/progress.cpp
@@ -87,20 +87,8 @@ void CProgressPageDlg::OnContextMenu(CCtrlBase*)
wszText.Append(L"\r\n");
}
}
- if (wszText.IsEmpty())
- break;
- if (::OpenClipboard(m_hwnd)) {
- size_t i = sizeof(wchar_t) * (wszText.GetLength() + 1);
-
- ::EmptyClipboard();
- HGLOBAL hData = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, i);
-
- memcpy((void*)::GlobalLock(hData), wszText, i);
- ::GlobalUnlock(hData);
- ::SetClipboardData(CF_UNICODETEXT, hData);
- ::CloseClipboard();
- }
+ Utils_ClipboardCopy(wszText);
break;
}