Re: Locking out "stray input" on a Pocket PC
- From: r_z_aret@xxxxxxxxxxxx
- Date: Fri, 11 Aug 2006 14:17:51 -0500
On Fri, 11 Aug 2006 10:35:19 -0500, "Beverly Howard
[Ms-MVP/MobileDev]" <BevNoSpamBevHoward.com> wrote:
Thought about this last night a bit...
You are assigning an action to the click event... consider assigning a
code snippet that poplates variables, then runs a process that
determines somthing such as the interval to determine if the press is
valid, then run (or not run) the action based on the conclusions of that
snippet.
Perhaps something like the "inverse" of this:
//---------------------------------------------------------------------
// PFWIsDoubleClick
// returns TRUE if called twice within time for double click
// See Jan 03 thread called "how to validate against two mouse clicks"
in
// comp.os.ms-windows.programmer.win32
inline BOOL PFWIsDoubleClick( DWORD *dTimeLast )
{
// TODO: Why does this often not work properly (requires
triple-click)?
// Answer: edit boxes let user select, so first click is used to
select
DWORD dNow = ::GetTickCount();
UINT uDif = static_cast<UINT>(dNow - *dTimeLast);
*dTimeLast = dNow;
return uDif < ::GetDoubleClickTime();
} // PFWIsDoubleClick
The caller is responsible for making sure dTimeLast has the
appropriate scope. My note references a newsgroup posting, but doesn't
specify the newsgroup; comp.os.ms-windows.programmer is a good guess.
You might also want to check a current thread called "Long press event
on a button" in microsoft.public.win32.programmer.wince. Nothing there
seems really useful for you so far, but it may turn up.
Beverly Howard [MS MVP-Mobile Devices]
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com
.
- Follow-Ups:
- Re: Locking out "stray input" on a Pocket PC
- From: JadeBlueSkies
- Re: Locking out "stray input" on a Pocket PC
- References:
- Locking out "stray input" on a Pocket PC
- From: JadeBlueSkies
- Re: Locking out "stray input" on a Pocket PC
- From: Beverly Howard [Ms-MVP/MobileDev]
- Re: Locking out "stray input" on a Pocket PC
- From: JadeBlueSkies
- Re: Locking out "stray input" on a Pocket PC
- From: r_z_aret
- Re: Locking out "stray input" on a Pocket PC
- From: r_z_aret
- Re: Locking out "stray input" on a Pocket PC
- From: JadeBlueSkies
- Re: Locking out "stray input" on a Pocket PC
- From: Beverly Howard [Ms-MVP/MobileDev]
- Locking out "stray input" on a Pocket PC
- Prev by Date: Some Pocket PC Programs don/t work with MDA?
- Next by Date: Re: Locking out "stray input" on a Pocket PC
- Previous by thread: Re: Locking out "stray input" on a Pocket PC
- Next by thread: Re: Locking out "stray input" on a Pocket PC
- Index(es):
Relevant Pages
|