GXSetDefaultDTP

Last Revision:
Version 1.0, 2003-01-14
First Version
Build Requirements:
Runtime Requirements:
Carbon

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