SHORT cap_state = ::GetKeyState(VK_CAPITAL);

    char str[10];

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

    AfxMessageBox( CString(str) , MB_OK );

 

会弹出0或者1

posted on 2015-03-18 21:19  今夜太冷  阅读(303)  评论(0编辑  收藏  举报