PocketMatrix forums

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

InRect

Code:
while(shared->ecd->input->GetClickEvent(&inputevent;))
{
if (inputevent.type == EIE_PRESSED)
{
if (InRect(&dialogr1;, inputevent.clickx) && InRect(&dialogr1;, inputevent.clicky))
{
dialog1active = 1;
}
}
}


Hi! I get error using this function, because InRect asks for POINT type for second parameter. All functions I can find to track stylus or mouse click uses long type, but maybe there is something I have missed?
Hi Ryumaster,

The POINT datatype consists of an x and y member. To convert coordinates use this:

Code:

POINT makepoint(long x, long y)
{
POINT tmp;
tmp.x = x;
tmp.y = y;
return(tmp);
}
Thanks a lot, it helped!