You are previewing Sams Teach Yourself Visual C++® .NET in 24 Hours.
O'Reilly logo
Sams Teach Yourself Visual C++® .NET in 24 Hours

Book Description

This book is for developers who want to develop .NET applications using Visual C++ 7.0 as the programming language. It covers the new features of Visual C++ which support .NET while lightly covering the new MFC and ATL enhancements as they relate to the .NET architecture, but focuses heavily on developing for the .NET framework. The book takes the reader through a simple .NET application, a more advanced application, and Internet development in .NET. The reader is also shown the differences between managed and unmanaged Visual C++ code and how to integrate them--critical information for migrating legacy C++ applications to the .NET architecture.

Table of Contents

  1. Copyright
  2. About the Author
  3. Acknowledgments
  4. Tell Us What You Think!
  5. Introduction
  6. Getting Started with Visual C++ .NET
    1. Using Visual C++ .NET
      1. Getting Familiar with the New IDE
      2. Application Types with Visual C++ .NET
      3. Working with Solutions and Projects
      4. Compiling and Debugging
      5. Summary
      6. Q&A
      7. Workshop
    2. Special Features of Visual C++ .NET
      1. Using the New Language Keywords
      2. Creating User-Defined Attributes
      3. Pragmas, Compiler, and Linker Features
      4. Summary
      5. Q&A
      6. Workshop
    3. Writing a Simple C++ .NET Program
      1. Building an MFC Application
      2. Building a Managed .NET Framework Application
      3. Comparing the Differences
      4. Summary
      5. Q&A
      6. Workshop
  7. Understanding .NET
    1. Understanding the Basics of .NET
      1. Understanding the .NET Framework Namespaces
      2. Commonly Used .NET Classes
      3. Deploying .NET Applications
      4. What Is the Common Language Runtime?
      5. Summary
      6. Q&A
      7. Workshop
    2. Understanding Managed Versus Unmanaged Code
      1. The Relationship Between Managed and Unmanaged Code
      2. Using Managed Code for Easy Memory Management
      3. Migrating Unmanaged Legacy Code
      4. Summary
      5. Q&A
      6. Workshop
    3. Integrating with Other .NET Languages
      1. Integrating .NET Component Assemblies
      2. Building the Project
      3. Summary
      4. Q&A
      5. Workshop
  8. Implementing a User Interface
    1. Working with Windows Forms
      1. Creating a Simple Windows Form
      2. Creating the Windows Form
      3. Building an MDI Interface with Windows Forms
      4. Summary
      5. Q&A
      6. Workshop
    2. Working with Resources
      1. The .NET Managed Resource File
      2. Creating the .NET Resource File
      3. Integrating the Resource File
      4. Reading Resources at Runtime
      5. Summary
      6. Q&A
      7. Workshop
    3. Programming with Graphics
      1. Understanding GDI+
      2. Building a Simple GDI+ Application
      3. Summary
      4. Q&A
      5. Workshop
    4. Printing with .NET
      1. Modifying the Toolbar and Menu
      2. Working with the PrintDocument Object
      3. Summary
      4. Q&A
      5. Workshop
  9. Server Development
    1. Creating Web Services
      1. Overview of Web Services and .NET
      2. Creating a Simple Web Service
      3. Using a Web Service Within an Application
      4. Summary
      5. Q&A
      6. Workshop
    2. Creating Web Services with ATL
      1. Creating an ATL Web Service Project
      2. Uncovering the ATL Web Service Implementation
      3. Building a Test Application
      4. Summary
      5. Q&A
      6. Workshop
    3. Working with .NET Error Handling and Diagnostics
      1. Understanding the .NET Error Handling Classes
      2. Understanding the Exception Class
      3. Overview of the Trace and Debug Classes
      4. Creating and Using Custom Exceptions
      5. Summary
      6. Q&A
      7. Workshop
    4. ATL Servers
      1. Why ATL Server?
      2. Creating an ATL Server Project
      3. ATL Server Sequence of Events
      4. The Server Response File
      5. Creating the NumberGuess Server Response File
      6. Implementing the Replacement Functions
      7. Summary
      8. Q&A
      9. Workshop
  10. Language Features
    1. Attributes
      1. A Step in the Right Direction: Attributes Simplify ATL Development
      2. Attributes and the Build Process
      3. Attribute Programming with ATL
      4. Creating an Attributed ATL Object
      5. Where's the IDL File?
      6. Creating the MFC Client to Access Your ATL Object
      7. Examining the Injected Attribute Code
      8. Summary
      9. Q&A
      10. Workshop
    2. Collections and Arrays
      1. .NET Framework Collection Class Design
      2. The Collection Classes
      3. Summary
      4. Q&A
      5. Workshop
    3. Interfaces
      1. Interfaces Explained
      2. Implementing .NET Framework Interfaces
      3. Creating Your Own Interface
      4. Creating the Client Application
      5. Summary
      6. Q&A
      7. Workshop
    4. Events and Delegates
      1. The Unified Event Model
      2. Working with Delegates
      3. Creating and Handling Managed Events
      4. Summary
      5. Q&A
      6. Workshop
  11. Advanced Programming
    1. Threading and Synchronization
      1. Threading and Synchronization Explained
      2. Creating Threads
      3. Creating the ThreadSynch Project
      4. Thread Synchronization
      5. Creating Consumer and Producer Objects
      6. Events and Timers
      7. Summary
      8. Q&A
      9. Workshop
    2. Database Access
      1. Connected vs. Disconnected Clients
      2. Redesigning ADO for the .NET Framework
      3. Creating the Authors ADO.NET Application
      4. Connecting to the Data Source
      5. Displaying and Navigating Through the Data
      6. Inserting and Deleting Table Records
      7. Summary
      8. Q&A
      9. Workshop
    3. COM with .NET
      1. COM Interop Design
      2. Using COM Objects within .NET
      3. Using .NET Objects Within COM Projects
      4. Summary
      5. Q&A
      6. Workshop
    4. Mixing Managed and Unmanaged Code
      1. Unmanaged and Managed Code Together
      2. Unmanaged Code Can Introduce Memory Leaks
      3. Platform Invocation
      4. Using P/Invoke to Call the MessageBox Function
      5. Using P/Invoke for Custom Data Types
      6. Specifying Specific Data Types for Marshaling
      7. Summary
      8. Q&A
      9. Workshop
    5. Control Class Libraries
      1. Controls Within the .NET Framework
      2. Creating the Custom Control Project
      3. Using Custom Controls in a Managed C++ Application
      4. Strong-Named Assemblies and the Global Assembly Cache
      5. Using Custom Controls with C# .NET
      6. Stock Properties
      7. Creating Custom Control Properties
      8. Summary
      9. Q&A
      10. Workshop
    6. Serialization
      1. Binary and XML Serialization
      2. Creating the ObjectSerialization Class and Windows Form
      3. Serializing with Attributes
      4. Customizing the Serialization Process
      5. Serializing and Deserializing Objects
      6. Summary
      7. Q&A
      8. Workshop
    7. Quiz Answers
      1. Hour 1
      2. Hour 2
      3. Hour 3
      4. Hour 4
      5. Hour 5
      6. Hour 6
      7. Hour 7
      8. Hour 8
      9. Hour 9
      10. Hour 10
      11. Hour 11
      12. Hour 12
      13. Hour 13
      14. Hour 14
      15. Hour 15
      16. Hour 16
      17. Hour 17
      18. Hour 18
      19. Hour 19
      20. Hour 20
      21. Hour 21
      22. Hour 22
      23. Hour 23
      24. Hour 24
    8. Visual Studio .NET IDE Reference
      1. Source Window
      2. Reducing Window Clutter
      3. Help System
  12. Index