G
Guest
I would like to block input to prevent controls like buttons from being
pressed for a short period of time while a sound is playing.
While my app is doing something like playing a sound synchronously, the user
can press buttons or other controls. These mouse events are queued up and
then my message pump processes them *after* the sound is done playing.
In this scenario, a user can press a button with the stylus but the program
won't act on it until several seconds later (depending on the duration of the
sound). This behavior is unwanted. Rather, it is preferred that such button
presses are ignored, which is preventable by blocking/filtering mouse and
keyboard input.
I have tried a couple of various methods but each one comes with its own
downfall and none have fully solved this problem.
What I would really like is to be able to make a call that tells the OS to
stop sending my application input messages, and then a call to tell the OS to
start sending them again. Any input between the two calls would be blocked
from making it to my application. There appears to be a BlockInput(bool) call
that does just this, but it's not supported in Windows CE as far as I can
tell.
NOTE: I am NOT trying to block CTRL+ALT+DEL or any other system key combos.
Just trying to block regular input, and thus preventing control events.
pressed for a short period of time while a sound is playing.
While my app is doing something like playing a sound synchronously, the user
can press buttons or other controls. These mouse events are queued up and
then my message pump processes them *after* the sound is done playing.
In this scenario, a user can press a button with the stylus but the program
won't act on it until several seconds later (depending on the duration of the
sound). This behavior is unwanted. Rather, it is preferred that such button
presses are ignored, which is preventable by blocking/filtering mouse and
keyboard input.
I have tried a couple of various methods but each one comes with its own
downfall and none have fully solved this problem.
What I would really like is to be able to make a call that tells the OS to
stop sending my application input messages, and then a call to tell the OS to
start sending them again. Any input between the two calls would be blocked
from making it to my application. There appears to be a BlockInput(bool) call
that does just this, but it's not supported in Windows CE as far as I can
tell.
NOTE: I am NOT trying to block CTRL+ALT+DEL or any other system key combos.
Just trying to block regular input, and thus preventing control events.