Step 1:

Application developed with Microsoft Visual C++, Part 1.


1st Step
, the begining ...

  1. Create the folder TestC in the C: drive, C:\TestC.

2nd Step, create the MFC AppWizard - (exe version) Application.

To begin writing Windows programs in Microsoft Visual C++ using Microsoft Wizards. Wizards, like the MFC AppWizard, the MFC ActiveX Control Wizard, the ISAPI Extension Wizard, and the ATL COM AppWizard help you generate the basic source files for a variety of different types of Windows programs.

MFC AppWizard   Generates a complete suite of source files and resource files based on classes from the MFC library. The are two versions of this wizard, one that helps you create an MFC executable program - (MFC e
xe) and one that helps you create an MFC DLL. Once you have completed the steps in AppWizard, Visual C++ creates a functional starter application for Windows from the starter files, without any further work on your part.

MFC exe makes it easy to work with one of three architectures of applications: Single Document Interface (SDI), Multiple Document Interface (MDI) and Dialog Based.

Note:
SDI applications allow only one open document frame window at a time. MDI applications allow multiple document frame windows to be open in the same instance of an application.


The MFC EXE program Wizard steps :

First, run the Microsoft Visual C++ 6

  1. From the File menu - (of Microsoft Visual C++), click New, the New dialog box appears, click the Projects tab and then specify the ...:
  2. Select the MFC AppWizard (exe) icon.
  3. In the Project name box, type TestVC0 .
  4. In the Location box, type C:\TestC\TestVC0.
  5. Select Create new workspace radio button. (by default).
  6. Platforms check box Win32. (by default)
  7. Click OK.

  8. The MFC Appwizard dialog box appears.

  9. In the MFC Appwizard - step 1 dialog box:
  10. Click the Dialog based radio button. - (type of application)
  11. Choose English ..., in the 'What language would you like your resource in?' combo box.
  12. Click Next.

  13. In the MFC Appwizard - step 2 of 4 dialog box:
  14. Select the About box, 3D Controls and ActiveX Controls check boxes. (by default)
  15. In the Please enter a title for your dialog box, type 'Learn how to write a Visual C++ application ...'.
  16. Click Next.

  17. In the MFC Appwizard - step 3 of 4 dialog box:
  18. Select the MFC Standard, Yes please and As a Shared DLL radio buttons. (by default)
  19. Click Next.

  20. In the MFC Appwizard - step 4 of 4 dialog box:
    you can check and, if necessary, modify the default names that AppWizard creates for your program’s classes and files.

    Classe name Header file Base class Implementation file
    CTestVC0App
    CTestVC0Dlg
    TestVC0.h
    TestVC0Dlg.h
    CWinApp
    CDialog
    TestVC0.cpp
    TestVC0Dlg.cpp


  21. Click Finish.

  22. The New Project Information dialog box appears, summarizing the settings and features AppWizard will generate for you when it creates your project.
    You might want to take a moment to examine the application type, classes, and features that AppWizard automatically provides.

    In the New Project Information dialog box:
  23. Click OK.

  24. Appwizard create all necessary files and opens the project.
    .
  25. The Project Workspace window contains ...

    You can switch from one view to another by clicking the tabs at the bottom of the Project Workspace window.

  26. TestVC0 classes - ClassView
    CAboutDlg
    - (base class CDialog)
    CTestVC0App
    - (base class CWinApp)
    CTestVC0Dlg
    - (base class CDialog)
  27. TestVC0 resources -ResourceView
    Dialog:
    IDD_ABOUTBOX -
    Dialog ID
    IDD_TESTVC0_DIALOG
    - Dialog ID
    Icon:
    IDR_MAINFRAME
    - Icon ID
    String Table...
    STring Table
    - Table
    Version
    VS_VERSION_INFO - Info
  28. TestVC0 files - FileView
    Source Files:
    stdafx.cpp
    - that includes just the standard includes TestVC0.pch will be the pre-compiled header stdafx.obj will contain the pre-compiled type information.
    TestVC0.cpp
    - Defines the class behaviors for the application.
    TestDlg VC.rc =
    TestVC0 resources.
    TestVC0Dlg.cpp -
    implementation file includes CAboutDlg dialog used for App About.
    Header Files:
    Resource.h -
    Microsoft Visual C++ generated include file Used by TESTVC0.RC.
    stdafx.h
    - include file for standard system include files, or project specific include files that are used frequently, but are changed infrequently.
    TestVC0.h - main header file for the TESTVC0 application.
    TestVC0Dlg.h - header file.

  29. Save this application.
    Run
    it, from Build menu, choose and click Execute TestVC0.exe.

Previous
Home 1 Home
Next