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-14

Build Requirements: N/A

Runtime Requirements: Carbon

View Source Code:

Download Sample (“GXSetDefaultDTP.zip”, 15.1K)
Download Sample (“GXSetDefaultDTP.dmg”, 73.5K)



Description

This application demonstrates how to send an AppleEvent to the Finder that will cause a new default desktop printer to be selected. The user interface consists of a dialog that collects a string that is the name of a desktop printer. Upon hitting the default button, the application forms an AppleEvent and sends it off to the Finder. The AppleEvent is constructed by getting the address of the Finder, generating a core event to a Finder extension, and adding a direct object which specifies the GX printing extension, the set default printer command, and the desktop printer name. If the Printing Finder Extension (part of QuickDraw GX) is installed and a valid desktop printer was specified then that printer should become the default printer. Requires: Keywords: print, desktop, AppleEvent

Document Revision History

Date Notes
2003-01-14First 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.