掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
WM_INPUTを最前面にいなくても受け取るには? (ID:18908)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
RAWINPUTDEVICE 構造体の dwFlags に RIDEV_INPUTSINK hwndTarget 自分のハンドル を指定することで、フックを使わずに WM_INPUT メッセージを受け取れました。 参考: RegisterRawInputDevices http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/rawinput/rawinputreference/rawinputfunctions/registerrawinputdevices.asp >Remarks >To receive WM_INPUT messages, an application must first register the raw input devices using RegisterRawInputDevices. By default, an application does not receive raw input. RAWINPUTDEVICE structure http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/rawinput/rawinputreference/rawinputstructures/rawinputdevice.asp >hwndTarget > Handle to the target device. If NULL, it follows the keyboard focus. (Handle to the "Window" の間違い?) Using Alternate Input Devices in Your Smart Client Applications http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/altinputdevices.asp
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.