我在CMainFrame里面 void CShowView::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 和PreTranslateMsg函数里面都加了消息截取代码if (nChar == 'p' || nChar == 'P')
{
do something
}但消息只能在我点击了客户区之后 按P键才能获取,,我如果是鼠标先点击了非客户区 按P就获取不到那个消息了现在的问题是我要怎么才能解决这个问题呢?
{
do something
}但消息只能在我点击了客户区之后 按P键才能获取,,我如果是鼠标先点击了非客户区 按P就获取不到那个消息了现在的问题是我要怎么才能解决这个问题呢?
{
// TODO: Add your specialized code here and/or call the base class
if(WM_KEYDOWN == pMsg->message && _T('P') == pMsg->wParam)
{
AfxMessageBox(_T("OK!"));
}
return CFrameWnd::PreTranslateMessage(pMsg);
}