发布网友 发布时间:2024-09-30 23:51
共1个回答
热心网友 时间:2024-10-05 21:39
没有得到消息的原因是焦点在对话框的其他子窗体上.
//解决办法
BOOL CAboutDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message==WM_KEYDOWN)
{
MessageBox("Key down"); // 在这里处理
}
return CDialog::PreTranslateMessage(pMsg);
}