搜索

关于MFC中OnKeyDown的问题

发布网友 发布时间: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);
}
声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。
E-MAIL:11247931@qq.com

热门图文

Top