[comp.sys.mac.programmer] Draging Icons, the solution found...

franco@bbn.com (Frank A. Lonigro) (04/19/88)

I've discovered what the problem is.  It turns out that I needed to re-read
the documentation on the DragGreyRgn() function.  It seems that depending on
where you click the mouse down in the region, there is an offset amount that
the Icon can hang out of limitRect.  So, the limitR and slopeR parameters
for this function do work properly.

As far as the return value goes, if the mouse is let up outside of slopeR,
then the 0x8000 return value is in the high-order word.  So the proper test
would be:

	upMouse = DragGreyRgn(.......);
	if (HiWord(upMouse) != 0x8000) { /* draw the region in the new place 
                                          */
		.
		.
	}
	else /* leave it where it was */

Thanks for listening,
-franco

franco@bbn.com
franco%bbn.com@relay.cs.net
...!harvard!bbn!franco