Ctrl + Z

来源:互联网 发布:无底洞抢票软件 编辑:程序博客网 时间:2024/04/28 03:15

BOOL CXXWnd::PreTranslateMessage(MSG* pMsg)
{
    if( pMsg->message == WM_KEYDOWN )
    {
        BYTE keybytes[256];
        memset(keybytes, 0, 256);
        GetKeyboardState(keybytes);
        if ( (pMsg->wParam == _T('Z') || pMsg->wParam == _T('z'))
          && (keybytes[VK_CONTROL] & 0x80) )
        {
            // to do, ctrl + 'z' or ctrl + 'Z'
        }
    }
    return CWnd::PreTranslateMessage(pMsg);
}

原创粉丝点击