Send a string to the clipboard
Without using OLE... Michael Pickens mfc_faq@stingray.com
AI
Ringkasan AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Kode Sumber
CString str = "Some text"; ::OpenClipboard(this->m_hWnd); ::EmptyClipboard(); HGLOBAL h = GlobalAlloc(GHND | GMEM_SHARE, str.GetLength() + 1); strcpy((LPSTR)GlobalLock(h), str); GlobalUnlock(h); ::SetClipboardData(CF_TEXT, h); ::CloseClipboard();
Komentar Asli (3)
Dipulihkan dari Wayback Machine