AppWizard and More in MFC
(Page 1 of 4 )
Welcome back, my friend. This time we’re going to take an in-depth look at two of the most used tools that are integrated into Visual Studio. They make the life of an MFC programmer or developer much happier and easier. You are reading the second segment of this five-part article series presenting the MFC.
First we will take a journey into the world of AppWizard. Every part of it will be clear to you as soon as you reach the end of that section. We will demystify it completely. The second tool is less complicated and not as packed with options, but its role is still important.
So I invite you to take a brief look at those settings that are asked for in the process of creating a new application. If this isn’t clear, please refer back to the first article of this series. Once we know what to do, we can decide whether the default settings suit us or if modifications are required. Note that some of the following options might not be in earlier versions of Visual Studio. But as they are present in the newer ones, they will be included here.
AppWizard
After you start up Visual Studio and create a new MFC application, the AppWizard will appear in front of you. After clicking on the first “Next” button, the Application Type related questions follow. Read below to see their explanations and descriptions.
Application Type:
Application Type:
Single Document - Allowing a single document/window to be opened at a time.
Multiple Document - If you want to fiddle with a multitude of windows inside your application, then choose this.
Dialog based – The main window will be a dialog like the Wizard’s window.
Multiple Top Level Document – Just like a Multiple Document, but now you can play with your windows in the outer portion of the main window too.
Document/View architect support - Makes it easy to support multiple views, multiple document types, splitter windows, and other valuable user-interfaces.
Resource Language – Quite self-explanatory.
Use Unicode Libraries – Unicode standard for encoding wide characters on Windows NT, Windows 2000, and Windows XP platforms.
Project Style:
Project Style:
Use MFC in a shared DLL - MFC libraries will be shared; it reduces the size of the final application, but you have to make sure that the end-user has this on his/her system.
Use MFC in a static library - You're going to get a bigger application size, but your application will work whether or not the end-user has the MFC libraries installed on his/her system.
The next tabs will hide the settings for the level of the compound and active document support. Please note that to do this, the Document/View architect is required.
Compound Document Support:
None
Container - Contains linked and embedded objects.
Mini server - Indicates that the application can create and manage compound document objects.
Full server - Indicates that the application can create and manage compound document objects.
Container/full server - Indicates that the application can be both a container and a server. A container is an application that can incorporate embedded or linked items into its own documents. A server is an application that can create automation items for use by container applications.
Furthermore, we come to the settings where we define the program’s file name, extension, etc.
Document Template Strings:
File extension - What extension you would prefer for the document created by the program.
File type ID – The label that will be assigned to the extension in the registry.
Language – Just a static text box showing the language that will be used; if you want a different one, go back to the Resource Language settings at the beginning.
Main frame caption – Change this if you want a different name to appear at the top of the main application frame (default is the project name).
Doc type name – Under which name do you want to group your files? For example, the documents with which MS Word can work are grouped under the MS DOC File Name.
Filter name – When you are opening/saving a new file, determines what kind of options will be at the filters place. For example, at our program, it will be MFC2008 type files with no extension (*.*) usage.
File new short name – The default name that will be assigned in case you create a new file type in your application.
File type long name - The file type name that will appear in the registry.
Picking a Database support level is what comes next. It is pretty understandable and straightforward. The options that aren’t mentioned and explained here are, simply put, beyond the article’s scope.
Next: Database support, user interface, and advanced features >>
More BrainDump Articles
More By Gabor Bernat