ctrl+c PreTranslateMessage
BOOL CNewTransformDLG::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if (GetDlgItem(IDC_EDIT_RECORD)->m_hWnd==pMsg->hwnd)
{
if (pMsg->message==WM_KEYDOWN)
{
if (GetKeyState('c')<0||GetKeyState('C')<0)
{
if (GetKeyState(VK_CONTROL)<0)
{
// MessageBox("complement ctrl+c"); //有检测到ctrl+c的信息,但是无法复制到数据。
return CDialog::PreTranslateMessage(pMsg);
}
}
}
if (
pMsg->message ==WM_LBUTTONDOWN||
pMsg->message ==WM_LBUTTONUP||
pMsg->message ==WM_RBUTTONDOWN||
pMsg->message ==WM_RBUTTONUP||
pMsg->message ==WM_PAINT||
pMsg->message ==WM_MOUSEMOVE||
pMsg->message ==WM_COPYDATA||
pMsg->message ==WM_COPY
)
{
return CDialog::PreTranslateMessage(pMsg);
}
return TRUE;
}
return CDialog::PreTranslateMessage(pMsg);
}
有检测到ctrl+c的信息,但是无法复制到数据。请告诉帮忙分析下……