PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Turning off the OS stylus down animation

Jon Wiesman · 20 Aug 2002, 23:16 UTC
Hi,

I am using GapiDraw 1.01. Whenever I tap the mouse and hold it for more than half a second, I get the OS animation of circles being drawn around my stylus. Is there any easy way to make this not happen? It also happens on the GDDemoCE, GDHelloGapi, and GDMaskDemoCE examples. Interestingly enough, it does not happen on the prototype of our product that we developed using GapiTools. I tried looking at the difference between the two products but could only see that the old GapiTools library relied on a CChildView window which made some Shell calls. I assume that these calls have been migrated into GapiDraw, but maybe I am wrong?

Please don't tell me the answer is to use the next version of GapiDraw! We are at a very mature part of our project and I don't want to port to the newest version unless absolutely necessary!

Thanks in advance,

Jon Wiesman
jwiesman@emodiv.com
Jon Wiesman · 20 Aug 2002, 23:22 UTC — I think I figured it out.
I was calling CMainFrame::OnLButtonDown in my LButtonDown Handler. I took it out. It seems to have fixed it.
Hi Jon,

I'm glad to hear that the transition from GapiTools to GapiDraw went well!

This is basically the way to do it..

Code:
void CChildView::OnLButtonDown(UINT nFlags, CPoint point)
{
#if defined(_WIN32_WCE) && (_WIN32_WCE >= 300)
// Hide PocketPC 2002 gesture display
SHRGINFO shrg;
shrg.cbSize = sizeof(shrg);
shrg.hwndClient = GetSafeHwnd();
shrg.ptDown.x = point.x;
shrg.ptDown.y = point.y;
shrg.dwFlags = SHRG_RETURNCMD | SHRG_NOANIMATION;
if (GN_CONTEXTMENU == ::SHRecognizeGesture(&shrg))
{
// Do not show a menu
}
#else
CWnd::OnLButtonDown(nFlags, point);
#endif

// Rest of code here
}


The most important aspect if you use PPC2000 is to call CWnd::OnLButtonDown() before the rest of your code. If you do not do so you may experience issues with dialogs etc...

/Johan