Page Setup
The Objective Chart view classes include a function, a message handler, that displays a dialog box that allows users to specify how the chart is to be placed on the printed page. Details on how to invoke this function are presented later in this section.
PageSetup Dialog
The page setup dialog, PageSetup, contains a check box labeled Use Max Size. None of the other controls are enabled until this box is checked; then users can select from a variety of sizes for the output rectangle, including the standard paper sizes. If the selected size is smaller that the paper size, users can also choose to align the chart to the Top, Center or Bottom of the page vertically and the Left, Middle, or Right of the page horizontally.
Figure 129 – Page Setup Dialog Box
PageSetup2 Dialog
Another page setup dialog, PageSetup2, lets the user choose between a few standard print sizes based on the page size of the currently selected printer. The user can also specify exact chart dimensions and margins. In particular, chart sizes larger than the printer page can be specified, because Objective Chart’s view classes now support multiple page printing. All the options on PageSetup2 set the chart’s Use Max Size() option, so the user does not face this confusing choice.
Figure 130 – Page Setup for Printing Chart
To make the page setup dialog available in your application:
*Create a menu item with the predefined resource identifier ID_GRAPH_PAGESETUP = 0xd103 or ID_GRAPH_PAGESETUP2 = 0xd144
*The message map in the Objective Chart view classes connects this command message with the function OnGraphPagesetup() or OnGraphPagesetup2(), which displays the dialog. No other coding is required.