Path: utzoo!mnetor!uunet!husc6!think!ames!hao!gatech!bbn!bbn.com!franco From: franco@bbn.com (Frank A. Lonigro) Newsgroups: comp.sys.mac.programmer Subject: Dragging ICONs Message-ID: <21013@bbn.COM> Date: 20 Feb 88 01:56:01 GMT Sender: news@bbn.COM Lines: 27 [[[[[ Line eaters unite ]]]]] To all LSC users: I'm new to programming the MAC and have a request. Could some of you send me your favorite piece of code for choosing and dragging ICONs with the mouse(not the whole program, just that section of code). I have this great book on programming the MAC in "C", "Using the Macintosh ToolBox with C". It's a good book and I'm learning alot, but it doesn't explain how to code the most used aspect of the Mac desktop, namely, choosing an ICON and have it become its mask and then dragging it to another spot on the desktop(be it in a window or the desktop itself). I have this idea that I need to define a rectangle, stick the image of the ICON in it and then detect a mouseDown event and determine if the Event.where point is enclosed by that rectangle. This is all well and good except how do you have it change to its mask? I also could use OffsetRect() to move it, but there must be an easier way to find out the "dh, dv" parameters. Is there such a function called DragRect() synonymous to DragWindow()?? Any and all help you can give would be greatly appreciated. Thanks in advance, -franco franco@bbn.com franco%bbn.com@relay.cs.net ...!harvard!bbn!franco