close


BOOL CMFC_CallbackApp::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
switch (pMsg->message)
{
case WM_MOUSEMOVE:
switch (pMsg->wParam){
case MK_LBUTTON:
::MessageBoxA(NULL, "MK_LBUTTON", "MK_LBUTTON", NULL);
break;
case MK_RBUTTON:
::MessageBoxA(NULL, "MK_RBUTTON", "MK_RBUTTON", NULL);
break;
}
break;

case WM_LBUTTONDOWN:
::MessageBoxA(NULL, "WM_LBUTTONDOWN", "WM_LBUTTONDOWN", NULL);
break;
case WM_KEYDOWN:
switch (pMsg->wParam){
case VK_RIGHT:
::MessageBoxA(NULL, "VK_RIGHT", "VK_RIGHT", NULL);
break;
case VK_F2:
::MessageBoxA(NULL, "VK_F2", "VK_F2", NULL);
break;
}

default:
break;
}

return CWinApp::PreTranslateMessage(pMsg);
}



Mouse Event
https://msdn.microsoft.com/zh-tw/library/windows/desktop/ff468877(v=vs.85).aspx
https://msdn.microsoft.com/zh-tw/library/windows/desktop/ms645616(v=vs.85).aspx



Key Event
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646268(v=vs.85).aspx



執行畫面,按鍵"→" 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 天才R 的頭像
    天才R

    做 個 有 趣 的 人

    天才R 發表在 痞客邦 留言(0) 人氣()