Project -> Class Wizard -> Choose correct Project and Class name -> Choose 'Virtual Functions' sheet -> PreTranslateMessage -> Add Function
Implement function as below.
BOOL CSystemInfoDlg::PreTranslateMessage(MSG* pMsg) {
if (pMsg->message == WM_KEYDOWN) {
if (pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE) {
return TRUE;
}
}
return CDialogEx::PreTranslateMessage(pMsg);
}
沒有留言:
張貼留言