Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Macintosh Toolbox Essentials /
Chapter 4 - Window Manager / Window Manager Reference
Window Manager Routines / Naming Windows


SetWTitle

Use the SetWTitle procedure to change a window's title.

PROCEDURE SetWTitle (theWindow: WindowPtr; title: Str255);
theWindow
A pointer to the window's window record.
title
The new window title.
DESCRIPTION
The SetWTitle procedure changes a window's title to the specified string, both in the window record and on the screen, and redraws the window's frame as necessary.

When the user opens a previously saved document, you typically create a new (invisible) window with the title "untitled" and then call SetWTitle to give the window the document's name before displaying it. You also call SetWTitle when the user saves a document under a new name.

To suppress the title in a window with a title bar, pass an empty string, not NIL.

Always use SetWTitle instead of directly changing the title in a window's
window record.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996