Re: Locking out "stray input" on a Pocket PC

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
.



Relevant Pages

  • Re: Refactoring from VBA to C#
    ... This is a code snippet, so would have to be placed ... Word.Cells oCells = oTbl.Range.Cells; ... This reply is posted in the Newsgroup; ...
    (microsoft.public.word.vba.general)
  • Re: menu
    ... At least I would go for your question to the newsgroup ... and seconde problem is that i want it to show some option when user ... can anyone send me the code snippet? ... "Problem is just the distance between the expectation and the reality" ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: _fdopen()
    ... This newsgroup is for questions about coding in VBA (specifically in Access, ... the database product that's part of Office Professional). ... Your code snippet would appear to be C or some variation thereof. ... setvbuf(sptr, buf, _IOFBF, sizeof(buf)); ...
    (microsoft.public.access.modulesdaovba)
  • Re: Locking out "stray input" on a Pocket PC
    ... 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 the action based on the conclusions of that snippet. ... Beverly Howard [MS MVP-Mobile Devices] ...
    (microsoft.public.pocketpc)
  • Re: Var Assignment.
    ... > Perhaps if I include the entire code snippet, ... > function startclock() { ... > stopclock(); ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.general)