In Chapter 8 you created the Facts for the Traveler (or moon facts) window to display various information about the moon. To add printing support to the moon facts window, you perform these steps:
Define constants for working with printing.
Define data types for working with printing.
Define prototypes for printing functions.
Write printing functions.
Add a print error format string to the
Add print setup code to the
Adjust code in the moon facts window event handler.
Test the Page Setup and Print commands to prove it all works.
These steps are described in the sections that follow.
In this section, you’ll define additional constants you’ll need to hook up printing for the moon facts window.
In Chapter 6 you
defined the constant
the Moon Travel Planner application. In Chapter 8
you defined the constants
the Page Setup and Print commands, as well as
identify the moon facts window text. You’ll use all these constants
in your printing code.
Now you’ll need to define constants to use when you store
and retrieve printing information for the moon facts window and
when you display printing errors. Copy the following definitions to
main.c file, below
the definition for
#define kMTPPrintInfoProperty 'Piwp' #define KMTPPrintFormatStrKey ...