BOOL CRichEditEx::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN)
{
if (pMsg->wParam == 'V' && GetKeyState(VK_CONTROL))
{
if ( OpenClipboard() )
{
::EmptyClipboard();
CloseClipboard();
}
}
}
return CRichEditCtrl::PreTranslateMessage(pMsg);
}
if ( OpenClipboard() )
{
HANDLE hData = GetClipboardData(CF_UNICODETEXT);
wchar_t * buffer = (wchar_t*)GlobalLock(hData);
fromClipboard = buffer;
MessageBox(fromClipboard);
GlobalUnlock(hData);
CloseClipboard();
}