Chapter 13 The AppWizard
Overview
To make it easier to write SFL-based applications, SFL provides an AppWizard. Like the MFC AppWizard, the SFL AppWizard generates several kinds of applications:
• Multiple Top-Level Window Interface applications
• Multiple Document Interface applications
• Dialog-based applications
• A bare-bones “Hello World” application
To generate an application using the SFL AppWizard, just choose
File|New from the Visual Studio main menu. Then select
SFLWiz70 from the available projects, shown in
Figure 17.
After giving your application a name, advance the AppWizard by pressing the
OK button. You’ll see the next dialog box, which lets you select the type of application to generate.
Figure 18 shows the SFL AppWizard dialog box.
Following is a description of each kind of application:
• Hello World Application. This is the simplest kind of application you can create. This option generates a small, single-window application, very much like the HelloSFL application mentioned above.
• SDI Application. This option generates an application featuring a single frame. The default for this type of application is for Multiple Top Level Interface. You can easily change the behavior, however, by changing the application base class from CMTIApp to CApp and overriding the File | New menu handler. The SDI Application option allows you to generate applications containing toolbars and status bars, the SFL Layout Manager, the Model-View-Controller architecture, and Print Preview.
• MDI Application. This option generates an application that features a single frame showing multiple document windows. The MDI Application option allows you to generate applications containing toolbars and status bars, the SFL Layout Manager, the Model-View-Controller architecture, and Print Preview.
• Dialog-based Application—A Dialog-based application is one whose window is simply a dialog box.
When creating SDI Applications or MDI Applications, the SFL AppWizard provides the ability to add Model/View/Controller support, a toolbar and a status bar, an about box, and even print preview. The SFL AppWizard responds to the Finish button by generating a set of C++ classes, based on the Stingray Foundation Library, which will compile into a full-fledged, living and breathing Windows application.