PDA

View Full Version : PtInRect func


zehlein
03-22-2008, 06:50 AM
So yes, first entry for me! :-)
The very helpful PtInRect(...) function is mising in the online help allthough mentioned a few times in the forum....

PointOfLight
03-22-2008, 05:57 PM
Man, I really hate to do this to the very first thread in this forum, but PtInRect is a Windows API call, so it won't be documented in PPL's help file.* Sorry :(

zehlein
03-23-2008, 12:33 AM
Well, why not? PPL encapsulates the API call, to me as an "end user" it doesn't matter where the function comes from. It even gets displayed in bold letters in the editor, so I assumed it is a native PPL function. Anyway, I simply use it, and it would be enough info for me to know the parameters and result.

PointOfLight
03-23-2008, 02:25 AM
Alain will have to chime in on this one. I was not aware that PPL was wrapping this function. If that's the case, then you are absolutely right, it should be documented.

[Edit]

By the way, until I get an answer for this, the function definition from MSDN is:

BOOL PtInRect(RECT rt, POINT pt);

PtInRect returns 0 if the point is not found in the rectangle, or non-zero if it is.

Of course, if you use the function you probably already know that :)

kornalius
04-04-2008, 04:24 PM
This function is wrapped by PPL by some obscure reason. A simple API call should work here. I guess it is left from an older version (beta).

Struct(r$, RECT);
Struct(p$, POINT);
if (PtInRect(r$, p$))
end;

As for MSDN functions, we will not document them, they are Windows API functions and not PPL's. MSDN.com is your friend.