Академический Документы
Профессиональный Документы
Культура Документы
Outline
Visual Studio C++ 6.0 project types MFC and its key features MFC AppWizard Dialog based application MFC Base classes Edit box, static controls, button controls
Version 6.0
It can be used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all platforms supported by Microsoft Windows, Windows Mobile, Windows CE, .NET Framework, .NET Compact Framework and Microsoft Silverlight.
To create a C++ program, If targeting MS Windows > 3.X click Win32 Console Application Check Win32 Platforms. Click OK
Project Types
ATL COM Wizard
ATL means Active Template Library, which is Template based programming. Programs would be faster and smaller. Usually use experienced c++ programmers.
COM stands for Component Object Model. Known as DLL file mostly. Programmers use components like as independent executable in their application instead of writing that application.
The
Creates two projects that you can deploy on a Microsoft Cluster Server to manage and monitor resources (applications) on the cluster:
Resource DLL project Manages and monitors a specific type of resource
(application). The name of this project is the name you give to the Cluster Resource Type project.
Cluster Administrator extension DLL
Loaded by the Cluster Administrator to allow resources (applications) of this new type to be configured. This DLL project is a COM, in-process server. The name of this project has the letters "Ex" appended to the name you give to the Cluster Resource Type project.
Client 2
Database projects
Stored procedure which is in form of text or query Extended stored procedure which is in form of DLL file
Win32
Win- means Windows 32 means 32 bit computer Can be develop win32 applications from early stage /beginning/.
Version 6.1
Introduction to MFC
Microsoft Foundation Class (MFC)
Advantages of MFC
Elimination of function and variable name collisions Encapsulation of code and data within the class Inheritance Reduced code size resulting from well-designed class libraries Resulting classes appearing to be natural extensions of the language
Over 200 classes CObject : base class of all MFC classes CCmdTarget : encapsulates the messaging features of Windows API CWinApp : initializing, starting, running, and stopping an MFC windows application CWnd : encapsulates various Windows API functions, data types, and other others used for creating and instantiating windows CDialog : creates dialog boxes CFrameWnd : creates standard type of windowframe window
parent for most classes in MFC optional runtime class information optional runtime creation support optional serialization support dump support for debugging based on Cobject parent class for all classes which can respond to Win32 messages
CCmdTarget
based on CCmdTarget parent class for all windows window size and position mouse capture and keyboard focus parent/child relationships stores application-wide data can be used to access standard cursors and icons can be used to access Windows Registry and *.ini files
CWinApp
Not a member of MFC class Prefix of Afx E.g.: AfxMessageBox() function displays a simple message box to the user Identical to MessageBox() function in CWnd Cannot use a member function before an object of the class is instantiated, => use global function
Represents C++ code, constants, and other programming elements that executes simply by calling the macro name Using #define preprocessor directive Already exists, no need to create in MFC All uppercase letters E.g.: BEGIN_MESSAGE_MAP() and END_MESSAGE_MAP() use for handling messages
MFC APPWIZARD
TestDlg.cpp
ClassWizard
ClassWizard helps you eliminate common coding errors, because much of the code can be written automatically
Add new classes Add member variables Bind resources and controls classes Add message-handling functions
Questions?