thank you
CodePudding user response:
Add # include & lt; Windows. H>Then use: BOOL b=GetKeyState (VK_NUMLOCK); To judge, if b is 1 is opened, zero is not opened
CodePudding user response:
GetKeyboardState
BYTE keyState [256]={0};
If (GetKeyboardState (keyState))
{
BYTE bNumLock=keyState [VK_NUMLOCK];
TRACE (_T (" VK_NUMLOCK 02 x=% \ n "), bNumLock);
}