★ wanayoo — archive 1999 http://developer.apple.com/samplecode/Sample_Code/Human_Interface_Toolbox/DragWindowGrid.htmNouvelle recherche | Portail wanayoo
Technical: Sample Code: Human Interface Toolbox: DragWindowGrid
Human Interface Toolbox
ADC Resources
Sample Code

DragWindowGrid

download (16.4 KB)

Version:

1.0d1

Date:

Thursday, August 5, 1999

Description:


DragWindowGrid- a sample showing how to write a function to drag a window around on the screen so that it can only be released along grid lines. No patches, no hooking into drag procs, nothing fancy. This just tracks an XOR frame around the screen similar to how the Window Manager behaves, and when you let go in a different spot MoveWindow moves the window to the right place.

DrawCode.c has the DragWindowGrid routine in it. You can change the kIncrement constant to change the size of the grid rects.




Samples are designed to work with CodeWarrior 2 or later and Universal Interfaces 3.2 unless otherwise noted. Archives can be uncompressed with StuffIt Expander 5.0 or later.
Gray line
 
Site Map | Search Tips | Options | Keywords

Contact Us | Privacy Notice
Copyright © 2000 Apple Computer, Inc. All rights reserved.
1-800-MY-APPLE