[EMAIL PROTECTED] wrote:
> Martin:
> Perfect, thank you. That will do for this application.
>
> Before Rob points it out, lemme say I understand could will produce an
> unreliable result if Windows switches tasks and another process uses it
> between the time my control gets and loses focus.

Actually, the reply I considered writing to Martin's suggestion had
nothing to do with other processes. I was going to point out that
GetAsyncKeyState is asynchronous. It gets the state of the key _right
now_, at the time the function is called. What you're probably more
interested in is the state of the key at the time the focus-control
message was sent. That's GetKeyState.

>>>Why have an input control when whatever I enter is going to get
>>> canceled?
> Why does it matter? There's nowhere else to tab to anyway.
> You haven't told us anything about the problem you're trying to solve.
> All you've told us is that you think that knowing how a control lost focus
> will let you solve that problem.<<
>
> You do live in an ivory tower sometimes :) !  I said explanations would
> only cloud the issue,

And then you went on to give further explanation, except to explain the
part that would have given more insight into the problem you were trying
to solve.

> and all I asked was if there was some way to tell if
> a control was tabbed out of. I'm not looking for the philosopher's stone.

In fact, you invited suggestions for better solutions, but how can anyone
expect to find solutions when the problem is still a mystery?

> Never mind the why and wherefore
> Clients pay the rent and therefore
> You admit their jurisdiction and then humbly do your bit
> Leaving judgement and conviction to the academic... wit.
>
> -in respectful jest, from a lowly tar who ploughs the windows.

OK. Let's pretend I'm posting a question to the mailing list:

Under what circumstances might it be necessary for a control to know that
it's losing the focus by tab navigation and not by any other means
(including the mouse, other keyboard shortcuts, or the Alt+Tab operation)?

-- 
Rob


Reply via email to