如何判断CapsLock键是否按下

    SHORT cap_state = ::GetKeyState(VK_CAPITAL);

    char str[10];

    sprintf(str, "%d", cap_state);

    AfxMessageBox( CString(str) , MB_OK );

 

会弹出0或者1

原文地址:https://www.cnblogs.com/time-is-life/p/4348660.html