添加PreTranslateMessage映射函數
然後pMsg ->wParam == 'O' && GetKeyState(VK_CONTROL)<0中改成相應字母和控件
BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
{
if(pMsg ->message == WM_KEYDOWN)
if((pMsg ->wParam == 'O' && GetKeyState(VK_CONTROL)<0) ||(pMsg ->wParam == 'S' && GetKeyState(VK_CONTROL)<0)
||(pMsg ->wParam == 'N' && GetKeyState(VK_CONTROL)<0 ))
return TRUE;
// TODO: Add your specialized code here and/or call the base class
return CFrameWnd::PreTranslateMessage(pMsg);
}
然後pMsg ->wParam == 'O' && GetKeyState(VK_CONTROL)<0中改成相應字母和控件
BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
{
if(pMsg ->message == WM_KEYDOWN)
if((pMsg ->wParam == 'O' && GetKeyState(VK_CONTROL)<0) ||(pMsg ->wParam == 'S' && GetKeyState(VK_CONTROL)<0)
||(pMsg ->wParam == 'N' && GetKeyState(VK_CONTROL)<0 ))
return TRUE;
// TODO: Add your specialized code here and/or call the base class
return CFrameWnd::PreTranslateMessage(pMsg);
}