May 26th, 1999, 01:23 PM
Hello All!!
(vc++ 6.0)
I have an dialog based activex control which just contains a single
button.
I have an interesting problem with event processing.
I catch the following events WM_LBUTTONDOWN, WM_LBUTTONUP, WM_KEYDOWN
and WM_KEYUP.
Now, when I get WM_LBUTTONUP, I start processing something from time t1
to t2, say.
If there is any mouse/keyboard events during that time (between t1 and
t2), I need to ignore them.
What I did is I disabled the button at time t1 and re-enabled at time
t2, thinking that it will solve my problem.
But what seems to be happening is that although I press the button
-before- t2 (i.e. during the processing), I am
actually seeing the event only -after- t2!
I am assuming that it is because the message pump isn't being called
often enough or something like that.
(I use the message map mechanism of ATL)
Can someone throw some light on what's wrong with my approach and what I
need to do to rectify it?
Thanks much!!
-P
(vc++ 6.0)
I have an dialog based activex control which just contains a single
button.
I have an interesting problem with event processing.
I catch the following events WM_LBUTTONDOWN, WM_LBUTTONUP, WM_KEYDOWN
and WM_KEYUP.
Now, when I get WM_LBUTTONUP, I start processing something from time t1
to t2, say.
If there is any mouse/keyboard events during that time (between t1 and
t2), I need to ignore them.
What I did is I disabled the button at time t1 and re-enabled at time
t2, thinking that it will solve my problem.
But what seems to be happening is that although I press the button
-before- t2 (i.e. during the processing), I am
actually seeing the event only -after- t2!
I am assuming that it is because the message pump isn't being called
often enough or something like that.
(I use the message map mechanism of ATL)
Can someone throw some light on what's wrong with my approach and what I
need to do to rectify it?
Thanks much!!
-P