int nState = GetKeyState(VK_LBUTTON);nState: If the high-order bit is 1, the key is down; otherwise, it is up. If the low-order bit is 1, the key is toggled. A key, such as the caps lock key, is toggled if it is turned on. The key is off and untoggled if the low-order bit is 0. A toggle key's indicator light (if any) on the keyboard will be on when the key is toggled, and off when the key is untoggled.
If the high-order bit is 1, the key is down; otherwise, it is up.
If the low-order bit is 1, the key is toggled. A key, such as the caps lock key, is toggled if it is turned on. The key is off and untoggled if the low-order bit is 0. A toggle key's indicator light (if any) on the keyboard will be on when the key is toggled, and off when the key is untoggled.
不过ONMOUSEMOVE的时候有鼠标按键状态传进来的.
如 GetAsyncKeyState (VK_LBUTTON) 取得鼠标左键当前的状态。但请注意,这里的左键指的是“物理”上的左键而非“逻辑”上的左键。关于鼠标键的物理和逻辑关系请调用GetSystemMetrics(SM_SWAPBUTTON)就可知了。