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