How many parameters does the PtInRect function take? My help file says 2...
The PtInRect function determines whether the specified point lies within the specified rectangle. A point is within a rectangle if it lies on the left or top side or is within all four sides. A point on the right or bottom side is considered outside the rectangle. 

BOOL PtInRect(

    CONST RECT  *lprc,	// address of structure with rectangle
    POINT  pt 	// structure with point
   );	
Parameters

lprc

Points to a RECT structure that contains the specified rectangle. 

pt

Specifies a POINT structure that contains the specified point. 

Return Value

If the specified point lies within the rectangle, the return value is TRUE.
If the function fails, the return value is FALSE. To get extended error information, call GetLastError.
But when i assemble it, masm says it takes 3. And when i put a third, it doesnt work.
Posted on 2001-04-05 19:51:00 by HeroInc
Mine also says 2, try chaning the include file so it takes 2 File user32.inc umbongo
Posted on 2001-04-05 19:54:00 by umbongo
PtInRect takes THREE paremeters: BOOL PtInRect( CONST RECT *lprc, // address of structure with rectangle POINT pt // structure with point ); Read that last line again: POINT pt // structure with point This isn't a reference to a point, it's the point itself. A point structure is two dwords, so this function takes 3 dwords total.
Posted on 2001-04-05 23:14:00 by Ernie