PocketMatrix forums

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

Problem with MainProc function

PointOfLight · 21 Nov 2004, 03:59 UTC
I'm trying to trap the WM_LBUTTONDOWN event in the MainProc function of my application. According to MSDN, the lParam$ variable is supposed to house the X value of the mouse in the LOWORD and the Y value in the HIWORD. However, when I do:

Code:

x$ = LOWORD(lParam$);
y$ = HIWORD(lParam$);


x$ actually contains the Y value of the mouse, and y$ is always 0. This used to work just fine. This is on the latest build of PPL, and I am using the GameAPI.
Oups, sorry should have mentionned it somewhere. The newest version of PPL passes the X mouse location in wParam$ and the Y location in the lParam$. It use to be passed in lParam$ only but this wouldn't support negative mouse location. Check Simple.ppl to see how it works now. wParam$ is the X value and lParam$ is the Y$ value.

Sorry again.
PointOfLight · 21 Nov 2004, 04:23 UTC
Didn't wParam already house a value? Or was that value not applicable in the WinCE world?
The wParam indicates whether various virtual keys are down. This is not neccessary imo with the GameAPI.
PointOfLight · 21 Nov 2004, 17:50 UTC
Okay. I didn't realize that this was just for the GameAPI. That makes sense.