close
方法非常簡單,兩個步驟
Step1. 在.h裡面新增這行
virtual BOOL PreTranslateMessage(MSG* pMsg);
Step2.在.cpp裡面重寫這個function
BOOL CT6NSConnectionStatusWindow::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN)
{
if (pMsg->wParam == VK_ESCAPE || pMsg->wParam == VK_RETURN)
{
return true;
}
}
return CDialog::PreTranslateMessage(pMsg);
}
That's all - -...
全站熱搜
留言列表