Re: PtInRect return value always zero....
- Posted by euman at bellsouth.net Aug 17, 2001
- 434 views
Before I get 1000 replies telling me to drop the junk = c_func(xScreenToClient, {hwnd, pt}) there is a reason for this, I hadnt explained yet. Just know that my WindowRect is 0, 0 rect_left / top Later, Euman euman at bellsouth.net > Hello, > > I need help with this, it doesnt seem to work at all... > > </snip> > > c_proc(xGetCursorPos, {pt} ) > > junk = c_func(xScreenToClient, {hwnd, pt}) > > c_proc(xGetWindowRect, {cntrl_id, rect} > > junk = c_func(xPtInRect, {rect, pt}) > > <snip\> > > First I retrieve the CursorPos and convert this to ClientCoords > next, I retrieve the WindowRect which sets (rect) the coords to > ctrl_id and test to see if the ClientCoord (pt) resides within > WindowRect (rect) with xPtInRect.. > > Very Simple and should work according to MS.... ;-0 > > hwnd and ctrl_id's handle, rect and pt address's are aquired already > and, are valid id's and address's > > I traced this out by peeking the pt and rect values and > according to the info I recieved and, the position of the Cursor > relative to the ctrl_id area junk @ xPtInRect should be nonzero > but, it always returns zero. > > Anyone faced this problem? > > It's really a trivial problem, I have a method that works for what I need > to accomplish at the moment so, no-one strain for an answer.. > > Euman > euman at bellsouth.net > > > > >