Disabling a window after SendInput()

Posted by DD on Stack Overflow See other posts from Stack Overflow or by DD
Published on 2010-04-12T17:04:03Z Indexed on 2010/04/13 21:13 UTC
Read the original article Hit count: 187

Filed under:

From my application I want to do two 'very basic' actions:

1. send a bunch of input (movemouse on window 'W', click, movemouse back) using SendInput()
2. disable window 'W' either by setting its layered alpha property to zero or using EnableWindow(W, FALSE).

No matter what the delay between 1 and 2 is, it doesn't work. If I don't ever disable the window, if I don't do step 2, then it works great all the time. I tried putting a Sleep(10000) and it still didn't work. Window gets disabled but it doesn't receive the input.

What could I be missing here?

© Stack Overflow or respective owner

Related posts about win32