Sign in to follow this  

Windows C++ Input Thread can't GetAsyncKeyState

This topic is 4259 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a main thread which creates an input thread, which seems to be able to get the cursor pos just fine. But at least when the window has lost focus (it's hidden), only my main thread is able to successfully GetAsyncKeyState but I want the input thread to be able to GetAsyncKeyState instead. The main thread however processes the WM_ input messages. The only thing I really do after executing _beginthread(ProcessInputThreadStarter, 0, this); is CoInitialize(NULL); (In a Input thread's function.) before I try to GetAsyncKeyState. What else should I do or is there no way I can have the input thread GetAsyncKeyState when the focus to the window has been lost?

Share this post


Link to post
Share on other sites

This topic is 4259 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this