PocketMatrix forums

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

StylusMove

Just a question on why this is implemented on the PC in the way it is, why is it called for normal mouse movement?

Since to register on the pda you have to press the stylus down first, it seems only natural that StylusMove be closer to a drag on the PC, than a mouse move.

Anything I can do about this, to make the PC closer to how it works on the pda? What I have to do now is just disable the move functions on the PC, with something like scrolling it is just constantly scrolling and therefore unusable.
mobile_fish · 06 Jan 2003, 20:03 UTC
hello, I'm a newbie here, so I really don't know why StylusMove on PC is implemented in this thay.
To emulate PDA's stylus functionality on PC you may do something like this:

Code:

bool is_stylus_down = false;

virtual HRESULT CMyApplication::StylusDown(POINT p)
{
is_stylus_down = true;

... your code here

return S_OK;
};

virtual HRESULT CMyApplication::StylusUp(POINT p)
{
is_stylus_down = false;

... your code here

return S_OK;
};

virtual HRESULT CMyApplication::StylusMove(POINT p)
{
if(!is_stylus_down) return S_OK;

... your code here

return S_OK;
};


This should work well on both PC and PDA. Hope you'll find this useful.
The problem is its only for the PC version. I just realized that all CGapiApplication does is pass on the MOUSEMOVE message and I can modify that class to create the effect I want.

So I'll do what you are saying, but only once in CGapiApplication.

Thanks for the reply.
That's exactly what I do in my apps mobile_fish. Doing it once in CGapiApplication would probably be more efficient (the stylus needs to be 'down' on the device in order to have a 'move' event), but if you plan on building your application under a new version of GapiDraw you will have to be sure to bring these code changes over to the new CGapiApplication header file that will be supplied.

-- GR
mobile_fish · 08 Jan 2003, 20:22 UTC
yes, you're right. The question is: why is it still not implemented yet in CGapiApplication?
Simply because some people need mousemove the way it is on stationary environments..