SRGraphView and SRGScrollView include command handlers for several predefined command IDs. The command IDs and their handlers are summarized in Table 20.
OnGraphEdit() initiates the Chart Editor/Explorer.
OnGraphWizard() initiates the interactive Chart Wizard.
OnGraphZoomout() restores the previous zoom level after zoom-in operation.
OnGraphZoomoutAll() restores the original, unzoomed zoom level.
OnGraphPagesetup() displays a dialog box for specifying the size and location of the chart on the printer page.
OnGraphPagesetup2() displays an alternative dialog box for specifying the size and location of the chart on the printer page. In addition to several choices that are relative to the size of the printer page, arbitrary sizes can be specified -- in particular, chart sizes may be larger than the printer page.
OnSaveAsDib() and OnSaveAsJpeg() write the chart to a disk file in Device Independent Bitmap or JPEG format.
OnEditCopy() places the chart on the clipboard as a bitmap.
In most cases, especially if the application has been created with the Objective Chart AppWizard, these menu items already exist in the resources of the application and handlers have already been attached to them. If the view was not created by the AppWizard, it may be necessary to create menu items for them.
To create menu items for the predefined commands:
Create a menu in the desired place using the resource editor.
In the properties for that menu item, change the ID to use the numeric value shown above for the desired function. For example, an application may have a File|Page setup entry in its menus.
To attach the new menu item to the ready-made handler, modify the properties so that the ID of the menu item reads IDC_FILE_PAGESETUP=OxD103.
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.