Applies ToWindows 7 Enterprise Windows 7 Home Premium Windows 7 Professional Windows 7 Home Basic Windows 7 Ultimate Windows 7 Starter Windows Server 2008 R2 Datacenter Windows Server 2008 R2 Enterprise Windows Server 2008 R2 for Itanium-Based Systems Windows Server 2008 R2 Foundation Windows Server 2008 R2 Standard Windows Server 2008 R2 Web Edition

狀況

試想下面情景︰ 在此案例中, GetKeyState函數會傳回索引鍵或滑鼠按鈕狀態不是關閉的狀態。不過,索引鍵或滑鼠按鈕應該保持按下的狀態直到相對應的索引鍵或滑鼠按鈕釋放訊息 (如 WM_KEYUP、 WMSYSKEYUP、 WM_LBUTTONUP) 處理。注意事項

原因

之所以發生這個問題,是因為 Windows 會建立新的輸入的佇列,而不複製KeyState屬性,在 < 徵狀=""> 一節所述的案例。因此,新的輸入佇列中的 [

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。