Skip to main content

Explain Visual C++ Project types.

Visual C++ Project Types
The Visual C++ New Project dialog box gives you the option of creating a project for the development of
applications, components, or libraries using the following methods:
 MFC development The MFC development option generates a framework based on MFC , which you
can use to develop applications, DLLs, or ActiveX controls. Other project types, such as those
generated by the Internet Server API (ISAPI) Extension Wizard, are also based on an MFC
framework.
Although MFC saves you time and effort in the creation of Windows programs, simple programs might
not justify the code size and performance overhead of MFC . To use MFC in an application, you need
to link the MFC static libraries to your code or ensure that the MFC DLLs are installed on each
computer that will run your application. C onsider whether your application needs the types of
application framework created by the MFC project options.
 Win32 development The Win32 options allow you to create simple Windows-based programs
without the overhead of MFC . You can choose to create an empty project configured with the
appropriate settings for generating Windows programs, which allows you to start developing a
Windows application from scratch. Alternatively, you may choose to have the wizard implement the
basic architecture of a Windows application. The wizard will handle basic tasks such as registering
your window classes, setting up a message loop to process user input to the program, and
implementing a basic window procedure to perform actions based on messages generated by the
user input. You also have an option to create a Windows DLL. Here, too, you may create a completely
empty project or create a project with sample code that shows you how to export classes, functions,
and variables from a DLL. You can also choose to create a simple console application that will run
without a graphical user interface from the command prompt, or choose an option to create a static
library for linking to an executable program at build time. These options allow you to include support
for MFC , which you might do if you want to take advantage of the MFC string or collection classes.
 ATL development The ActiveX Template Library (ATL) is a set of template-based C ++ classes that
helps you create small, fast C OM objects. We will be covering ATL in depth in C hapters 9 through 11.
The ATL COM AppWizard allows you to create a C OM server, a DLL, or an .exe file that can host COM
components. Once you have used the wizard to create your ATL project, you can add a number of
different types of ATL-based C OM objects. These can include simple C OM objects, objects that can be
used with Microsoft Transaction Services or in Active Server Pages, Microsoft Management C onsole
SnapIns, ActiveX user-interface controls, and OLE DB data providers and consumers. Other project
types, such as those generated by the DevStudio Add-in Wizard, are also based on ATL templates.
 Miscellaneous projects A number of C ++ development options do not fall into the above
categories. These include options that allow you to create DLL resources to run on Microsoft Internet
Information Server (IIS) or on Microsoft C luster Server. You can also write your own Visual Studio
add-ins, create general-purpose utility projects, and develop your own custom AppWizards.
NOTE
The Enterprise edition of Visual C ++ contains some project options not found in the Standard or Professional
editions. These allow you to work with DEFINTION (ODBC ) databases directly from Visual Studio and to
create SQL Server extended stored procedures.

Comments

Popular posts from this blog

MFC - Microsoft Foundation Classes Design Patterns

1 Introduction This paper describes the use of object-oriented software design patterns, as presented in Design Patterns: Elements of Reusable Object-Oriented Software by Gamma et al., within the Microsoft Foundation Class Library (MFC). MFC is used for implementing applications for Microsoft Windows operating systems. Because of the size of the MFC library, a complete analysis would have been beyond the scope of this assignment. Instead, we identified various possible locations for design patterns, using the class hierachy diagram of MFC, and studied the source carefully at these locations. When we did not find a pattern where we expected one, we have documented it anyway, with examples of how the particular problem could have been solved differently, perhaps more elegantly, using design patterns. We have included a brief introduction to MFC in Section 2 , as background information. The analysis has been split into three parts, with one section for each major design pattern ca...

Explain Polymorphism and Flavors of Polymorphism...

Polymorphism is the ability of different objects to react in an individual manner to the same message. This notion was imported from natural languages. For example, the verb "to close" means different things when applied to different objects. Closing a door, closing a bank account, or closing a program's window are all different actions; their exact meaning is determined by the object on which the action is performed. Most object-oriented languages implement polymorphism only in the form of virtual functions. But C++ has two more mechanisms of static (meaning: compile-time) polymorphism: Operator overloading. Applying the += operator to integers or string objects, for example, is interpreted by each of these objects in an individual manner. Obviously, the underlying implementation of += differs in every type. Yet, intuitively, we can predict what results are. Templates. A vector of integers, for example, reacts differently from a vector of string objects when it receives ...

• Why might you need exception handling be used in the constructor when memory allocation is involved?

Your first reaction should be: "Never use memory allocation in the constructor." Create a separate initialization function to do the job. You cannot return from the constructor and this is the reason you may have to use exception handling mechanism to process the memory allocation errors. You should clean up whatever objects and memory allocations you have made prior to throwing the exception, but throwing an exception from constructor may be tricky, because memory has already been allocated and there is no simple way to clean up the memory within the constructor.