16,473
社区成员
发帖
与我相关
我的任务
分享
void CMicView::OnEditPaste()
{
((CMainFrame*)AfxGetMainWnd())->SetMessageText(_T("pasted!"));
if(OpenClipboard())
{
HANDLE hMem = GetClipboardData(CF_TEXT);
if (hMem)
{
m_strText.Delete(m_nStart, m_nEnd - m_nStart);
m_strText.Insert(m_nStart, (LPCTSTR)GlobalLock(hMem));
GlobalUnlock(hMem);
Invalidate();
}
CloseClipboard();
}
}