BOOL CDlgShiftDlg::PreTranslateMessage(MSG* pMsg)
{
// 捕获Alt键或者Shift+Alt组合键
if(pMsg->message == WM_SYSKEYDOWN)
{
switch(pMsg->wParam)
{
case VK_DELETE:
MessageBox("你按下的是Alt+Delete组合键或Alt+shift+Delete组合键!", "信息提示", MB_OK);
return TRUE;
case VK_INSERT:
MessageBox("你按下的是Alt+Insert组合键或Alt+shift+Insert组合键!", "信息提示", MB_OK);
return TRUE;
case VK_HOME:
MessageBox("你按下的是Alt+Home组合键或Alt+shift+Home组合键!", "信息提示", MB_OK);
return TRUE;
case VK_END:
MessageBox("你按下的是Alt+End组合键或Alt+shift+End组合键!", "信息提示", MB_OK);
return TRUE;
}
}
return CDialog::PreTranslateMessage(pMsg);
}