From: Goran on 7 Apr 2010 09:50 On Apr 7, 3:11 pm, "AliR" <A...(a)online.nospam> wrote: > Which OS is this on. I tried this on XP and GetAsyncKeyState said that the > key was down. Vista ent. 64-bit. Goran.
From: David Lowndes on 7 Apr 2010 09:56 >Which OS is this on. I tried this on XP and GetAsyncKeyState said that the >key was down. Isn't that the problem, since the mouse button is clearly released? Dave
From: AliR on 7 Apr 2010 10:12 I mean it said the mouse was up. Sorry. AliR. "David Lowndes" <DavidL(a)example.invalid> wrote in message news:fn3pr55cih7rv897emeubgopi66b4aot4e(a)4ax.com... > >Which OS is this on. I tried this on XP and GetAsyncKeyState said that > >the >>key was down. > > Isn't that the problem, since the mouse button is clearly released? > > Dave
From: David Lowndes on 7 Apr 2010 10:46 >I mean it said the mouse was up. Sorry. No problem. Now I've tried it I can't repro it either (Windows 7). Dave
From: Joseph M. Newcomer on 7 Apr 2010 15:33 I think it is a timing issue; the mouse button state has not been updated yet in the context of the outer message pump. The GetAsyncKeyState function, I believe, requires scanning the key states, which is don periodically to update the vector; it is not done 'on demand' when the API is executed. I am fishing back in memory to a discussion of some years ago. joe On Wed, 7 Apr 2010 05:25:02 -0700 (PDT), Goran <goran.pusic(a)gmail.com> wrote: >On Apr 6, 8:13�pm, Joseph M. Newcomer <newco...(a)flounder.com> wrote: >> Perhaps because you had to click the OK button? �And the mouse button is still down? �You >> are essentially seeing the result of the difference between computer speed and human >> speed; within a few tens to a small integer number of hundreds of microseconds after you >> have clicked the button, the mouse button state is examined, and according to the >> instantaneous state, the mouse button is still down, because the message that it has come >> up has not yet been processed. �I find the basic idea of this test more than a little >> weird, actually. �Why would you care if the mouse button was down a few nanoseconds after >> the DoModal() returns? > >No, there really is something fishy (I tried yesterday). > >You have to __release__ the mouse button for the UI button to fire >"clicked" event (I am guessing, I didn't trace through that, I just >called DoModal()). That's normal behavior. So when I release my mouse >button, UI button should fire "clicked" and mouse button it should >exactly be released. But GetAsyncKeyState says it isn't! Amazing! >Why?! How!? I have no explanation. > >Looks like a question for MS people. > >> >Is the left button really down? >> >> >Is there something else I could do to check if the left button is down. >> >> **** >> Please explain why you think this is important. > >That, I would like to know why, too. Just out of curiosity, might >learn about some use-case I never met in the wild. > >Goran. Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: MSMQ problem Next: Setting PropertySheet Title (Wizard mode) |