Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Version: 1.0

Posted: 2003-01-30

Build Requirements: N/A

Runtime Requirements: Carbon

View Source Code:

Download Sample (“GridWindowGrow.zip”, 21.6K)
Download Sample (“GridWindowGrow.dmg”, 85.8K)


This snippet shows how to grow a window constrained to a grid (i.e. only allow a window to grow or shrink by 30 pixels). You might think that using something like DragHook (see the Window Manager documentation) would be the best way to approach this, but the easiest way to do this is just to write a small MyGrowWIndow function and use that. Or, even better, just grab this one demonstrated here. Requirements: Keywords: hwindowide, grid, DragHook

Document Revision History

Date Notes
2003-01-30First Version

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.