Home Index  | Back

New Page 1
Lesson 1 -Building Your First Windows Application

1.1 : Creating a Windows Application

1.2 : Creating a Dialog-Based Application

1.3 : Creating DLLs, Console Applications, and More

1.4 : Changing Your AppWizard Decisions
 1.5 : Understanding AppWizard’s Code
 1.6 : Understanding a MDI Application
 1.7 : Understanding the Components of a Dialog-Based Application

Lesson 2 - Dialogs and Controls

2.1 : Understanding Dialog Boxes

2.2 : Creating a Dialog Box Resource

 2.3 : Writing a Dialog Box Class
 2.4 : Using the Dialog Box Class
Lesson 3 - Messages and Commands

3.1 : Understanding Message Routing

3.2 : Understanding Message Loops

 3.3 : Reading Message Maps
 3.4 : Learning How ClassWizard Helps You Catch Messages
 3.5 : Recognizing Messages
 3.6 : Understanding Commands
 3.7 : Understanding Command Updates
 3.8 : Learning How ClassWizard Helps You Catch Commands and Command Updates

Lesson 4 - Documents and Views

4.1 : Understanding the Document Class

4.2 : Understanding the View Class

4.3 : Creating the Rectangles Application

 4.4 : Other View Classes

4.5 : Document Templates, Views, and Frame Windows

Lesson 5 - Drawing on the Screen

5.1 :Understanding Device Contexts

 5.2 : Introducing the Paint1 Application
 5.3 : Building the Paint1 Application
 5.4 : Scrolling Windows
 5.5 : Building the Scroll Application
Lesson 6 - Building a Complete Application: ShowString

6.1 : Building an Application That Displays a String

 6.2 : Building the ShowString Menus
 6.3 : Building the ShowString Dialog Boxes
 6.4 : Making the Menu Work
 6.5 : Making the Dialog Box Work
 6.6 : Adding Appearance Options to the Options Dialog Box
Lesson 7 -  Status Bars and Toolbars

7.1 : Working with Toolbars

 7.2 : Working with Status Bars
Lesson 8 - Common Controls

8.1 : The Progress Bar Control

 8.2 : The Up-Down Control
 8.3 : The Image List Control
 8.4 : The List View Control
 8.5 : The Tree View Control
 8.6 : The Rich Edit Control
 8.7 : The Date Picker Control
 8.8 : Month Calendar Control
 8.9 : Scrolling the View
Lesson 9 - Property Pages and Sheets

9.1 : Introducing Property Sheets

 9.2 : Creating the Property Sheet Demo Application
 9.3 : Running the Property Sheet Demo Application
Lesson 10 - ActiveX Concepts

10.1 : The Purpose of ActiveX

10.2 : Object Linking

10.3 : Object Embedding

 10.4 : Containers and Servers
 10.5 : Toward a More Intuitive User Interface
 10.6 : The Component Object Model  

10.7 : Automation

 10.8 : ActiveX Controls

Lesson 11 -  Building an ActiveX Control

11.1 : Creating a Rolling-Die Control

11.2 : Displaying the Current Value

11.3 : Reacting to a Mouse Click and Rolling the Die 

 11.4 : Creating a Better User Interface
 11.5 : Generating Property Sheets
Lesson 12 - Database Access

12.1 : Understanding Database Concepts

12.2 : Creating an ODBC Database Program

 12.3 : Choosing Between ODBC and DAO
 12.4 : OLE DB

Lesson - 1 : Building Your First Windows Application

1.3 : Creating DLLs, Console Applications, and More

Although most people use AppWizard to create an executable program, it can make many other kinds of projects. You choose File, New and then the Projects tab, as discussed at the start of this unit, but choose a different wizard from the list on the left of the New dialog box, shown in Figure 1.1. The following are some of the other projects AppWizard can create:

  • ATL COM AppWizard

  • Custom AppWizard

  • Database Project

  • DevStudio Add-In Wizard

  • Extended Stored Procedure AppWizard

  • ISAPI Extension Wizard

  • Makefile

  • MFC ActiveX ControlWizard

  • MFC AppWizard (dll)

  • Utility Project

  • Win32 Application

  • Win32 Console Application

  • Win32 Dynamic Link Library

  • Win32 Static Library

  • These projects are explained in the following sections.

    1.3.1 ATL COM AppWizard

    ATL is the Active Template Library, and it’s used to write small ActiveX controls. It’s generally used by developers who have already mastered writing MFC ActiveX controls, though an MFC background is not required to learn ATL.

    1.3.2 Custom AppWizard

    Perhaps you work in a large programming shop that builds many applications. Although AppWizard saves a lot of time, your programmers may spend a day or two at the start of each project pasting in your own boilerplate, which is material that is the same in every one of your projects. You may find it well worth your time to build a Custom AppWizard, a wizard of your very own that puts in your boilerplate as well as the standard MFC material. After you have done this, your application type is added to the list box on the left of the Projects tab of the New dialog box shown in Figure 1.1.

    1.3.3 Database Project

    If you have installed the Enterprise Edition of Visual C++, you can create a database project.

    1.3.4 DevStudio Add-In Wizard

    Add-ins are like macros that automate Developer Studio, but they are written in C++ or another programming language; macros are written in VBScript. They use automation to manipulate Developer Studio.

    1.3.5 ISAPI Extension Wizard

    ISAPI stands for Internet Server API and refers to functions you can call to interact with a running copy of Microsoft Internet Information Server, a World Wide Web server program that serves out Web pages in response to client requests. You can use this API to write DLLs used by programs that go far beyond browsing the Web to sophisticated automatic information retrieval.

    1.3.6 Makefile

    If you want to create a project that is used with a different make utility than Developer Studio, choose this wizard from the left list in the New Project Workspace dialog box. No code is generated. If you don’t know what a make utility is, don’t worry—this wizard is for those who prefer to use a standalone tool to replace one portion of Developer Studio.

    1.3.7 MFC ActiveX ControlWizard

    ActiveX controls are controls you write that can be used on a Visual C++ dialog, a Visual Basic form, or even a Web page. These controls are the 32-bit replacement for the VBX controls many developers were using to achieve intuitive interfaces or to avoid reinventing the wheel on every project.

    1.3.8 MFC AppWizard (DLL)

    If you want to collect a number of functions into a DLL, and these functions use MFC classes, choose this wizard. (If the functions don’t use MFC, choose Win32 Dynamic Link Library, discussed a little later in this section).

    1.3.9 Win32 Application

    There are times when you want to create a Windows application in Visual C++ that doesn’t use MFC and doesn’t start with the boilerplate code that AppWizard produces for you. To create such an application, choose the Win32 Application wizard from the left list in the Projects tab, fill in the name and folder for your project, and click OK. You are not asked any questions; AppWizard simply creates a project file for you and opens it. You have to create all your code from scratch and insert the files into the project.

    1.3.10 Win32 Console Application

    A console application looks very much like a DOS application, though it runs in a resizable window. (Console applications are 32-bit applications that won’t run under DOS, however.) It has a strictly character-based interface with cursor keys instead of mouse movement. You use the Console API and character-based I/O functions such as printf() and scanf() to interact with the user. Some very rudimentary boilerplate code can be generated for you, or you can have just an empty project.

    1.3.11 Win32 Dynamic Link Library

    If you plan to build a DLL that does not use MFC and does not need any boilerplate, choose the Win32 Dynamic Link Library option instead of MFC AppWizard (dll). You get an empty project created right away with no questions.

    1.3.12 Win32 Static Library

    Although most code you reuse is gathered into a DLL, you may prefer to use a static library because that means you don’t have to distribute the DLL with your application. Choose this wizard from the left list in the New Project Workspace dialog box to create a project file into which you can add object files to be linked into a static library, which is then linked into your applications.

    Next>>
     
    © Dewsoft Overseas