Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC
PATHDocumentation > Mac OS 8 and 9 > Human Interface Toolbox > Window Manager >

Programming With the Mac OS 8.5 Window Manager


Creates the drag reference and the drag image when the user drags a proxy icon.

pascal OSStatus BeginWindowProxyDrag (
                     WindowPtr window,
                     DragReference *outNewDrag,
                     RgnHandle outDragOutlineRgn);
A value of type WindowPtr . Pass a pointer to the window whose proxy icon is being dragged.
A pointer to a value of type DragReference . On return, the value refers to the current drag process.
A value of type RgnHandle . Your application can create this handle with a call to the QuickDraw function NewRgn . On return, this region is set to the outline of the icon being dragged.
function result
A result code. See Result Codes.

Typically, if the proxy icon represents a type of object (currently, file system entities such as files, folders, and volumes) supported by the Window Manager, the Window Manager can handle all aspects of the drag process itself, and your application should call the function TrackWindowProxyDrag . However, if the proxy icon represents a type of data that the Window Manager does not support, or if you wish to implement custom dragging behavior, your application should call the function TrackWindowProxyFromExistingDrag .

The TrackWindowProxyFromExistingDrag function accepts an existing drag reference and adds file data if the window contains a file proxy. If your application uses TrackWindowProxyFromExistingDrag , you then have the choice of using this function in conjunction with the functions BeginWindowProxyDrag and EndWindowProxyDrag or simply calling TrackWindowProxyFromExistingDrag and handling all aspects of creating and disposing of the drag yourself.

Specifically, your application can call BeginWindowProxyDrag to set up the drag image and drag reference. Your application must then track the drag, using TrackWindowProxyFromExistingDrag , and do any required moving of data and, finally, call EndWindowProxyDrag to dispose of the drag reference. BeginWindowProxyDrag should not be used for types handled by the Window Manager unless the application wishes to implement custom dragging behavior for those types.

Your application detects a drag when the function FindWindow returns the inProxyIcon result code; see FindWindow Result Code Constant for the Proxy Icon for more details.

See Supporting Window Proxy Icons for examples of how your application can provide proxy icon support in its document windows.


Available with Mac OS 8.5 and later.

1999 Apple Computer, Inc. – (Last Updated 18 March 99)

Get information on Apple products.
Visit the Apple Store online or at retail locations.

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice