PreTranslateMessage收到按键消息不处理如何判断不出来
PreTranslateMessage收到按键消息不处理怎么判断不出来
BOOL TabCtrl::PreTranslateMessage(MSG *pMsg)
{ if(m_bToolTipEnable==true)
if(m_pToolTip!=NULL && m_pToolTip->m_hWnd!=NULL)
m_pToolTip->RelayEvent(pMsg);
if(pMsg->message == VK_ESCAPE)
{
return 1;
}
return CWnd::PreTranslateMessage(pMsg);
}
------解决方案--------------------
给个例子,消息和参数搞错了
if(WM_KEYDOWN==pMsg->message && VK_F1==pMsg->wParam) //按F1的键消息截获
------解决方案--------------------
进不来啊
if(WM_KEYDOWN==pMsg->message &&VK_ESCAPE==pMsg->wParam)
{
return 1;
}
BOOL TabCtrl::PreTranslateMessage(MSG *pMsg)
{ if(m_bToolTipEnable==true)
if(m_pToolTip!=NULL && m_pToolTip->m_hWnd!=NULL)
m_pToolTip->RelayEvent(pMsg);
if(pMsg->message == VK_ESCAPE)
{
return 1;
}
return CWnd::PreTranslateMessage(pMsg);
}
------解决方案--------------------
给个例子,消息和参数搞错了
if(WM_KEYDOWN==pMsg->message && VK_F1==pMsg->wParam) //按F1的键消息截获
------解决方案--------------------
进不来啊
if(WM_KEYDOWN==pMsg->message &&VK_ESCAPE==pMsg->wParam)
{
return 1;
}