VC/MFCはeditコントロールを貼り付け操作できない
715 ワード
BOOL PersonDlg::PreTranslateMessage(MSG* pMsg)
{
if (GetDlgItem(IDC_EDIT_USER_ID)->m_hWnd == pMsg->hwnd ||
GetDlgItem(IDC_EDIT_USER_NAME)->m_hWnd == pMsg->hwnd ||
GetDlgItem(IDC_EDIT_PHONE)->m_hWnd == pMsg->hwnd ||
GetDlgItem(IDC_EDIT_IDCARD)->m_hWnd == pMsg->hwnd )
{
if (pMsg->message == WM_RBUTTONUP || pMsg->message == WM_KEYDOWN && pMsg->wParam == 'V' && (GetAsyncKeyState(VK_CONTROL) & 0x8000))
return TRUE;
}
return CRTDialog::PreTranslateMessage( pMsg );
}