Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
DragWindowGrid
Last Revision: | Version 1.0, 2003-01-30 First Version |
Build Requirements: | |
Runtime Requirements: | Carbon |
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. Keywords: grid, window, MoveWindow, Window Manager
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-30