Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Views User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

2.2 Using the Objective Views AppWizard

When you install Objective Views, the Objective Views AppWizard is added to the Visual Studio environment. The AppWizard asks the user a series of questions and generates a working application that uses the Objective Views library. Except for the addition of two steps specific to Objective Views, it is identical to the MFC AppWizard. Using the Objective Views AppWizard, you can quickly create applications that serve as a starting point for your projects.

2.2.1 Starting the Objective Views AppWizard

  1. Open Visual Studio IDE. Select the File|New|Project menu command.

  2. Select Visual C++ | MFC projects from the Installed Templates.

  3. Select Stingray Objective Views Application Wizard from the list of available project types.

    Figure 5: Visual Studio New Project Dialog

If Stingray Objective Views Application Wizard does not appear in the project type list, the AppWizard is not properly installed. Please contact Rogue Wave Technical Support for additional information.

2.2.2 Selecting Options in the Objective Views AppWizard

The AppWizard consists of a series of pages. Each page consists of options that you can select for your application. Navigate between steps using the links in the left frame of the dialog. On the first page of the AppWizard, you can click the Finish button to select the defaults for the remaining steps and generate the application.

The Objective Views AppWizard is based on the Visual Studio MFC AppWizard, and the steps are identical. See the Microsoft Visual Studio documentation to learn more about the MFC AppWizard.

Instead of MFC Feature Pack framework classes, the Objective Views AppWizard uses classes from Stingray Studio library FoundationEx. For example, in an MDI application it uses SFLWinAppEx instead of CWinAppEx, SFLMDIFrameWndEx instead of CMDIFrameWndEx, and SFLMDIChildWndEx instead of CMDIChildWndEx. Also, the AppWizard adds classes derived from Objective Views-specific ones: CODModel, CODViewport, CODController.

2.2.2.1 Toolbar Commands in Visual Studio

The Objective Views AppWizard adds the following FoundationEx bars instead of the MFC Feature Pack ones:

These bars are created with specific code inside the CMainFrame::OnCreate() method. For example:

To create other Objective Views toolbars, simply replace IDR_SYMBOLS with the corresponding resource name, and create another SFLToolBarEx member variable.

A full list of Objective Views toolbar creation methods can be found in the <stingray-installdir>\Samples\Views\Showcase sample, or the <stingray-installdir>\Samples\FoundationEx\ShowcaseEx sample. Look inside the CMainFrame::OnCreate() method.

2.2.2.2 Zoom/Pan

The Zoom/Pan toolbar contains commands for zooming and panning the canvas.

Figure 6: Zoom/Pan toolbar

2.2.2.3 Drawing

The Drawing toolbar contains commands for basic shapes on the canvas.

Figure 7: Drawing toolbar

2.2.2.4 Alignment

Contains commands for aligning components with respect to a given anchor component. The anchor component is always the last component selected and is differentiated from the other selected components by gray selection handles.

Figure 8: Alignment toolbar

2.2.2.5 Rotate

Contains commands for rotating the selected components.

Figure 9: Rotate toolbar

2.2.2.6 Nudge

Contains commands for moving the selected components by one logical unit in any direction.

Figure 10: Nudge toolbar

2.2.2.7 Structure

Contains commands for grouping components together and changing the Z-order (stacking order of layers) of components on the canvas.

Figure 11: Structure toolbar

2.2.2.8 Layout

Contains commands for arranging components with respect to each other. The spacing commands take three or more components and evenly space them between the minimum and maximum points in the range selected. The size commands adjust the size of the selected components to match the anchor component.

Figure 12: Layout toolbar

2.2.2.9 Canvas

Contains commands that change the appearance and behavior of the canvas.

Figure 13: Canvas toolbar

This step also contains a checkbox group called Canvas Options. These options affect the appearance and behavior of the canvas. The two options in this group allow the user to add ruler guides to the canvas. The user can add a horizontal ruler, a vertical ruler, or both.

2.2.3 Generating the Application

The last page in the Objective Views AppWizard looks like Figure 14.

Figure 14: AppWizard - Generated classes and files

This page displays the names of classes and files generated by the Objective Views AppWizard. The Class Name, Header File, and Implementation File fields on this dialog display information regarding the currently selected class in the list box. The user can change the class name, header file, or implementation file by editing these fields.

When you click the Finish button, the Objective Views AppWizard creates the files for your new project and loads it into Visual Studio.

You can add _OVDLL in Preprocessor Definitions if you want to link dynamically to Objective Views library. The AppWizard creates the project for Win32 builds only. You can add x64 build configurations if you need to.

If you are using Visual Studio 2010, please refer to Section 2.7.4, "Microsoft Visual Studio 2010 Changes," in the Stingray Studio Getting Started Guide for information on how to add property sheet(s) with Stingray Studio paths to the project..

At this point, the application is ready to build and run. Make sure that the Objective Views libraries have been built prior to building and running your new project.



Previous fileTop of DocumentContentsNo linkNext file

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.