search for books and compare prices
Tables of Contents for Programming With Microsoft
Chapter/Section Title
Page #
Page Count
Acknowledgments
xxvii
 
Introduction
xxix
 
Part I Windows, Visual C++ .NET, and Application Framework Fundamentals
Windows and Visual C++ .NET
3
14
The Windows Programming Model
3
3
Message Processing
3
1
The Windows Graphics Device Interface
4
1
Resource-Based Programming
5
1
Memory Management
5
1
Dynamic-Link Libraries
6
1
The Win32 Application Programming Interface
6
1
Visual C++ .NET Components
6
11
Visual C++ .NET and the Build Process
8
1
The Resource View Window and the Resource Editors
9
1
The C/C++ Compiler
10
1
The Source Code Editor
10
1
The Resource Compiler
11
1
The Linker
11
1
The Debugger
11
1
The MFC Application Wizard
12
1
Class View
13
1
Solution Explorer
13
1
The Object Browser
13
1
Unified Modeling Language Tools
14
1
Online Help
15
1
Windows Diagnostic Tools
16
1
The MFC Library Version 7
16
1
The ATL Library Version 7.0
16
1
.NET Support
16
1
The Microsoft Foundation Class Library Application Framework
17
16
Why Use This Application Framework?
17
6
The Learning Curve
22
1
What's an Application Framework?
23
4
An Application Framework vs. a Class Library
23
1
An Application Framework Example
23
4
MFC Library Message Mapping
27
6
Documents and Views
27
6
Part II MFC Essentials
Getting Started with the MFC Application Wizard
33
16
What's a View?
34
1
MFC Library Application Types
34
1
MFC Library User Interfaces
35
1
Ex03a: The ``Do-Nothing'' Application
35
5
The CEx03aView View Class
40
1
Drawing Inside the View Window: The Windows GDI
40
3
The OnDraw Member Function
40
1
The Windows Device Context
41
1
Adding Draw Code to the Ex03a Program
41
2
A Preview of the Resource Editors
43
2
The Contents of Ex03a.rc
43
1
Running the Dialog Resource Editor
44
1
Win32 Debug Target vs. Win32 Release Target
45
1
Understanding Precompiled Headers
46
2
Two Ways to Run a Program
48
1
Visual C++ .NET Wizards
49
12
Wizard Types
49
1
How Wizards Work
50
1
Creating a Wizard
51
2
Creating a Wizard for Developing Web Applications Using Managed C++
53
8
Windows Message Mapping
61
28
Getting User Input: Message Map Functions
62
11
The Message Map
62
1
Saving the View's State: Class Data Members
63
1
Invalid Rectangle Theory
64
1
The Window's Client Area
64
1
CRect, CPoint, and CSize Arithmetic
65
1
Determining Whether a Point Is Inside a Rectangle
65
1
The CRect LPCRECT Operator
66
1
Determining Whether a Point Is Inside an Ellipse
66
1
The Ex05a Example
66
4
Using Class View with Ex05a
70
3
Using Windows Mapping Modes
73
8
The MM_TEXT Mapping Mode
74
1
The Fixed-Scale Mapping Modes
75
1
The Variable-Scale Mapping Modes
76
2
Coordinate Conversion
78
1
The Ex05b Example: Converting to the MM_HIMETRIC Mapping Mode
79
2
Creating a Scrolling View Window
81
5
A Window Is Larger Than What You See
81
1
Scroll Bars
81
1
Scrolling Alternatives
81
1
The OnInitialUpdate Function
82
1
Accepting Keyboard Input
82
1
The Ex05c Example: Scrolling
82
4
Using Other Windows Messages
86
3
The WM_CREATE Message
86
1
The WM_CLOSE Message
86
1
The WM_QUERYENDSESSION Message
86
1
The WM_DESTROY Message
87
1
The WM_NCDESTROY Message
87
2
Classic GDI Functions, Fonts, and Bitmaps
89
46
The Device Context Classes
89
3
The CClientDC and CWindowDC Display Context Classes
90
1
Constructing and Destroying CDC Objects
90
1
The State of the Device Context
91
1
The CPaintDC Class
92
1
GDI Objects
92
4
Constructing and Destroying GDI Objects
93
1
Tracking GDI Objects
94
1
Stock GDI Objects
94
1
The Lifetime of a GDI Selection
95
1
Fonts
96
4
Fonts Are GDI Objects
96
1
Selecting a Font
96
1
Printing with Fonts
97
1
Displaying Fonts
97
1
Logical Inches and Physical Inches on the Display
98
1
Computing Character Height
99
1
The Ex06a Example
100
4
The Ex06a Program Elements
103
1
The Ex06b Example
104
3
The Ex06b Program Elements
106
1
The Ex06c Example: CScrollView Revisited
107
5
The Ex06c Program Elements
110
2
The CScrollView SetScaleToFitSize Mode
112
1
Using the Logical Twips Mapping Mode in a Scrolling View
112
1
Bitmaps
112
2
GDI Bitmaps and Device-Independent Bitmaps
113
1
Color Bitmaps and Monochrome Bitmaps
114
1
DIBs and the CDib Class
114
14
A Few Words About Palette Programming
114
2
DIBs, Pixels, and Color Tables
116
1
The Structure of a DIB Within a BMP File
116
2
DIB Access Functions
118
1
The CDib Class
118
7
DIB Display Performance
125
1
The Ex06d Example
125
3
Going Further with DIBs
128
2
The LoadImage Function
128
1
The DrawDibDraw Function
129
1
Putting Bitmaps on Pushbuttons
130
5
The Ex06e Example
131
2
Going Further with Bitmap Buttons
133
2
Dialog Boxes
135
42
Modal vs. Modeless Dialog Boxes
135
1
Resources and Controls
136
1
Programming a Modal Dialog Box
136
1
The Ex07a Example: The Dialog Box That Ate Cincinnati
137
16
Building the Dialog Resource
138
7
Creating the Dialog Class
145
5
Connecting the Dialog Box to the View
150
2
Understanding the Ex07a Application
152
1
Enhancing the Ex07a Application
153
4
Taking Control of the OnOK Exit
153
1
OnCancel Processing
154
1
Hooking Up the Scroll Bar Controls
155
2
Identifying Controls: CWnd Pointers and Control IDs
157
1
Setting the Dialog Box Background Color or a Control Color
157
1
Adding Dialog Controls at Run Time
158
1
Using Other Control Features
158
1
Windows Common Dialog Boxes
159
8
Using the CFileDialog Class Directly
160
1
Deriving from the Common Dialog Classes
160
1
Nested Dialog Boxes
160
1
The Ex07b Example: CFileDialog
161
5
Other Customizations for CFileDialog
166
1
Programming a Modeless Dialog Box
167
10
Creating Modeless Dialog Boxes
167
1
User-Defined Messages
168
1
Dialog Box Ownership
168
1
The Ex07c Example: A Modeless Dialog Box
169
8
Common Controls
177
34
Standard Common Controls
178
3
The Progress Control
178
1
The Slider Control
178
1
The Spin Control
179
1
The List Control
179
1
The Tree Control
180
1
The WM_NOTIFY Message
180
1
The Ex08a Example: Standard Common Controls
181
13
Advanced Common Controls
194
4
The Date and Time Picker
194
2
The Month Calendar
196
1
The Internet Protocol Address Control
196
1
The Extended Combo Box
197
1
The Ex08b Example: Advanced Common Controls
198
13
Using ActiveX Controls
211
30
ActiveX Controls vs. Ordinary Windows Controls
212
2
Ordinary Controls: A Frame of Reference
212
1
How ActiveX Controls Are Similar to Ordinary Controls
212
1
How ActiveX Controls Differ from Ordinary Controls: Properties and Methods
213
1
Installing ActiveX Controls
214
1
The Calendar Control
215
2
ActiveX Control Container Programming
217
6
Property Access
217
1
Visual Studio .NET's C++ Wrapper Classes for ActiveX Controls
217
3
MFC Application Wizard Support for ActiveX Controls
220
1
The Add Class Wizard and the Container Dialog Box
220
2
Locking ActiveX Controls in Memory
222
1
The Ex09a Example: An ActiveX Control Dialog Container
223
9
ActiveX Controls in HTML Files
232
1
Creating ActiveX Controls at Run Time
232
1
The Ex09b Example: The Web Browser ActiveX Control
233
4
Picture Properties
237
1
Bindable Properties: Change Notifications
238
3
Win32 Core Memory Management
241
16
Processes and Memory Space
241
4
The Windows 95/98 Process Address Space
243
2
The Windows NT/2000/XP Process Address Space
245
1
How Virtual Memory Works
245
3
The VirtualAlloc Function: Committed and Reserved Memory
248
1
The Windows Heap and the GlobalAlloc Function Family
249
1
The Small-Block Heap, the C++ new and delete Operators, and _heapmin
250
1
Memory-Mapped Files
251
2
Accessing Resources
253
1
Tips for Managing Dynamic Memory
254
1
Optimizing Storage for Constant Data
254
3
Windows Message Processing and Multi-Threaded Programming
257
20
Windows Message Processing
257
6
How a Single-Threaded Program Processes Messages
258
1
Yielding Control
258
1
Timers
259
1
The Ex11a Program
259
4
On-Idle Processing
263
1
Multi-Threaded Programming
264
13
Writing the Worker Thread Function and Starting the Thread
264
1
How the Main Thread Talks to a Worker Thread
265
1
How the Worker Thread Talks to the Main Thread
266
1
The Ex11b Program
267
2
Using Events for Thread Synchronization
269
1
The Ex11c Program
269
2
Thread Blocking
271
1
Critical Sections
272
2
Mutexes and Semaphores
274
1
User Interface Threads
274
3
Part III MFC's Document-View Architecture
Menus, Keyboard Accelerators, the Rich Edit Control, and Property Sheets
277
32
The Main Frame Window and Document Classes
278
1
Windows Menus
279
1
Keyboard Accelerators
280
1
Command Processing
280
3
Command Message Handling in Derived Classes
281
1
Update Command User Interface Handlers
282
1
Commands That Originate in Dialog Boxes
282
1
The Application Framework's Built-in Menu Commands
283
1
Enabling and Disabling Menu Commands
284
1
MFC Text Editing Options
284
1
The CEditView Class
284
1
The CRichEditView Class
284
1
The CRichEditCtrl Class
285
1
The Ex12a Example
285
7
Property Sheets
292
1
Building a Property Sheet
292
1
Property Sheet Data Exchange
292
1
The Ex12a Example Revisited
293
13
Apply Button Processing
306
1
The CMenu Class
306
1
Creating Floating Shortcut Menus
307
1
Extended Command Processing
307
2
Toolbars and Status Bars
309
24
Control Bars and the Application Framework
309
1
Toolbars
310
3
The Toolbar Bitmap
310
1
Toolbar Button States
311
1
The Toolbar and Command Messages
311
1
Toolbar Update Command User Interface Message Handlers
312
1
ToolTips
313
1
Locating the Main Frame Window
313
1
The Ex13a Example: Using Toolbars
314
5
Status Bars
319
3
The Status Bar Definition
320
1
The Message Line
320
1
The Status Indicator
321
1
Taking Control of the Status Bar
321
1
The Ex13b Example: Using Status Bars
322
6
Rebars
328
1
Anatomy of a Rebar
328
1
The Ex13c Example: Using Rebars
329
4
A Reusable Frame Window Base Class
333
16
Why Reusable Base Classes Are Difficult to Write
333
1
The CPersistentFrame Class
334
1
The CFrameWnd::ActivateFrame Member Function
334
1
The PreCreateWindow Member Function
335
1
The Windows Registry
336
3
Using the CString Class
339
2
The Position of a Maximized Window
341
1
Control Bar Status and the Registry
341
1
Static Data Members
342
1
The Default Window Rectangle
342
1
The Ex14a Example: Using a Persistent Frame Window Class
342
6
Persistent Frames in MDI Applications
348
1
Separating the Document from Its View
349
42
Document-View Interaction Functions
349
3
The CView::GetDocument Function
350
1
The CDocument::UpdateAllViews Function
351
1
The CView::OnUpdate Function
351
1
The CView::OnInitialUpdate Function
352
1
The CDocument::OnNewDocument Function
352
1
The Simplest Document-View Application
352
1
The CFormView Class
353
1
The CObject Class
354
1
Diagnostic Dumping
355
5
The TRACE Macro
355
1
The afxDump Object
355
1
The Dump Context and the CObject Class
356
1
Automatic Dump of Undeleted Objects
357
3
The Ex15a Example: A Simple Document-View Interaction
360
7
A More Advanced Document-View Interaction
367
1
The CDocument::DeleteContents Function
368
1
The CObList Collection Class
369
4
Using the CObList Class for a First-In, First-Out List
369
1
CObList Iteration: The POSITION Variable
370
2
The CTypedPtrList Template Collection Class
372
1
The Dump Context and Collection Classes
372
1
The Ex15b Example: A Multi-View SDI Application
373
17
Resource Requirements
375
1
Code Requirements
376
13
Protected Virtual Functions
389
1
Testing the Ex15b Application
390
1
Two Exercises for the Reader
390
1
Reading and Writing Documents
391
46
What Is Serialization?
391
6
Disk Files and Archives
392
1
Making a Class Serializable
393
1
Writing a Serialize Function
393
1
Loading from an Archive: Embedded Objects vs. Pointers
394
2
Serializing Collections
396
1
The Serialize Function and the Application Framework
397
1
The SDI Application
397
8
The Windows Application Object
397
2
The Document Template Class
399
2
The Document Template Resource
401
1
Multiple Views of an SDI Document
401
1
Creating an Empty Document: The CWinApp::OnFileNew Function
402
1
The Document Class's OnNewDocument Function
403
1
Connecting File Open to Your Serialization Code: The OnFileOpen Function
403
1
The Document Class's DeleteContents Function
404
1
Connecting the File Save and File Save As Commands to Your Serialization Code
404
1
The Document's ``Dirty'' Flag
405
1
The Ex16a Example: SDI with Serialization
405
10
CStudent
406
1
CEx16aApp
406
4
CMainFrame
410
3
The CEx16aDoc Class
413
1
The CEx16aView Class
414
1
Testing the Ex16a Application
414
1
Windows Explorer Launch and Drag and Drop
415
2
Program Registration
415
1
Double-Clicking on a Document
416
1
Enabling Drag and Drop
416
1
Program Startup Parameters
416
1
Experimenting with Explorer Launch and Drag and Drop
417
1
MDI Support
417
8
A Typical MDI Application, MFC Style
418
1
The MDI Application Object
419
1
The MDI Document Template Class
419
1
The MDI Frame Window and the MDI Child Window
420
2
The Main Frame and Document Template Resources
422
1
Creating an Empty Document
422
1
Creating an Additional View for an Existing Document
423
1
Loading and Storing Documents
424
1
Multiple Document Templates
424
1
Explorer Launch and Drag and Drop
425
1
The Ex16b Example: An MDI Application
425
9
CEx16bApp
426
4
CMainFrame
430
2
CChildFrame
432
2
Testing the Ex16b Application
434
1
MTI Support
434
3
The Ex16c Example: An MTI Application
435
1
Testing the Ex16c Application
436
1
Printing and Print Preview
437
20
Windows-Based Printing
437
3
Standard Printer Dialog Boxes
437
2
Interactive Print Page Selection
439
1
Display Pages vs. Printed Pages
439
1
Print Preview
440
1
Programming for the Printer
440
2
The Printer Device Context and the CView::OnDraw Function
440
1
The CView::OnPrint Function
440
1
Preparing the Device Context: The CView::OnPrepareDC Function
441
1
The Start and End of a Print Job
441
1
The Ex17a Example: A WYSIWYG Print Program
442
7
Reading the Printer Rectangle
448
1
Template Collection Classes Revisited: The CArray Class
449
1
The Ex17b Example: A Multi-Page Print Program
450
7
Splitter Windows and Multiple Views
457
14
The Splitter Window
457
1
View Options
458
1
Dynamic and Static Splitter Windows
459
1
The Ex18a Example: A Single View Class SDI Dynamic Splitter
459
2
Resources for Splitting
460
1
CMainFrame
460
1
Testing the Ex18a Application
461
1
The Ex18b Example: A Double View Class SDI Static Splitter
461
3
CHexView
462
1
CMainFrame
462
1
Testing the Ex18b Application
463
1
The Ex18c Example: Switching View Classes Without a Splitter
464
2
Resource Requirements
464
1
CMainFrame
464
2
Testing the Ex18c Application
466
1
The Ex18d Example: A Multiple View Class MDI Application
466
5
Resource Requirements
467
1
CEx18dApp
467
1
CMainFrame
468
1
Testing the Ex18d Application
469
2
Context-Sensitive Help
471
24
WinHelp vs. HTML Help
471
2
The Windows WinHelp Program
473
7
Rich Text Format
473
1
Writing a Simple Help File
474
5
An Improved Table of Contents
479
1
The Application Framework and WinHelp
480
5
Calling WinHelp
480
1
Using Search Strings
481
1
Calling WinHelp from the Application's Menu
481
1
Help Context Aliases
482
1
Determining the Help Context
482
1
F1 Help
483
1
Shift+F1 Help
483
1
Message Box Help: The AfxMessageBox Function
484
1
Generic Help
484
1
A Help Example with No Programming Required
485
2
Help Command Processing
487
1
F1 Processing
487
1
Shift+F1 Processing
488
1
Example Ex19b: Help Command Processing
488
3
Header Requirements
489
1
CStringView
489
1
CHexView
490
1
Resource Requirements
490
1
Help File Requirements
490
1
Testing the Ex19b Application
491
1
MFC and HTML Help
491
1
Example Ex19c: HTML Help
492
3
Dynamic-Link Libraries
495
26
DLL Fundamentals
495
6
How Imports Are Matched to Exports
496
1
Implicit Linkage vs. Explicit Linkage
497
1
Symbolic Linkage vs. Ordinal Linkage
498
1
The DLL Entry Point: DIIMain
499
1
Instance Handles: Loading Resources
499
1
How the Client Program Finds a DLL
500
1
Debugging a DLL
500
1
MFC DLLs: Extension vs. Regular
501
9
MFC Extension DLLs: Exporting Classes
502
1
The MFC Extension DLL Resource Search Sequence
502
1
The Ex20a Example: An MFC Extension DLL
503
2
The Ex20b Example: A DLL Test Client Program
505
1
MFC Regular DLLs: The AFX_EXTENSION_MODULE Structure
506
1
Using the AFX_MANAGE_STATE Macro
506
1
The MFC Regular DLL Resource Search Sequence
506
1
The Ex20c Example: An MFC Regular DLL
507
2
Updating the Ex20b Example: Adding Code to Test Ex20c.dll
509
1
A Custom Control DLL
510
11
What Is a Custom Control?
511
1
A Custom Control's Window Class
511
1
The MFC Library and the WndProc Function
512
1
Custom Control Notification Messages
512
1
User-Defined Messages Sent to the Control
513
1
The Ex20d Example: A Custom Control
513
5
Revising the Updated Ex20b Example: Adding Code to Test Ex20d.dll
518
3
MFC Programs Without Document or View Classes
521
10
The Ex21a Example: A Dialog Box--Based Application
521
5
The Application Class InitInstance Function
524
1
The Dialog Class and the Program Icon
525
1
The Ex21b Example: An SDI Application
526
2
The Ex21c Example: An MDI Application
528
3
Part IV COM, Automation, ActiveX, and OLE
The Component Object Model
531
40
ActiveX Technology
531
1
What Is COM?
532
12
The Essence of COM
532
1
What Is a COM Interface?
533
5
The IUnknown Interface and the QueryInterface Member Function
538
3
Reference Counting: The AddRef and Release Functions
541
1
Class Factories
541
2
The CCmdTarget Class
543
1
The Ex22a Example: Simulated COM
544
7
Real COM with the MFC Library
551
11
The COM CoGetClassObject Function
551
1
COM and the Windows Registry
552
1
Runtime Object Registration
553
1
How a COM Client Calls an In-Process Component
554
2
How a COM Client Calls an Out-of-Process Component
556
3
The MFC Interface Macros
559
1
The MFC COleObjectFactory Class
560
1
Wizard Support for COM In-Process Components
560
2
MFC COM Client Programs
562
1
The Ex22b Example: An MFC COM In-Process Component
562
4
The Ex22c Example: An MFC COM Client
566
2
Containment vs. Aggregation vs. Inheritance
568
3
Automation
571
70
Creating C++ Components for VBA
571
1
Automation Clients and Components
572
4
Excel: A Better Visual Basic Than Visual Basic
573
2
Properties, Methods, and Collections
575
1
Automation Interfaces
576
1
The IDispatch Interface
576
1
Automation Programming Choices
577
2
The MFC IDispatch Implementation
579
1
An MFC Automation Component
579
2
An MFC Automation Client Program
581
2
An Automation Client Program That Uses the Compiler's #import Directive
583
1
The VARIANT Type
584
2
The COleVariant Class
586
50
Parameter and Return Type Conversions for Invoke
589
1
Automation Examples
590
1
The Ex23a Example: An Automation Component EXE with No User Interface
591
9
The Ex23b Example: An Automation Component DLL
600
9
The Ex23c Example: An SDI Automation Component EXE with User Interface
609
7
The Ex23d Example: An Automation Client
616
16
The Ex23e Example: An Automation Client
632
4
VBA Early Binding
636
5
Registering a Type Library
636
1
How a Component Can Register Its Own Type Library
636
1
The IDL File
637
1
How Excel Uses a Type Library
638
1
Why Use Early Binding?
639
1
Faster Client-Component Connections
639
2
Uniform Data Transfer: Clipboard Transfer and OLE Drag and Drop
641
26
The IDataObject Interface
641
1
How IDataObject Improves on Standard Clipboard Support
642
1
The FORMATETC and STGMEDIUM Structures
642
3
FORMATETC
643
1
STGMEDIUM
644
1
IDataObject Interface Member Functions
644
1
Other IDataObject Member Functions: Advisory Connections
645
1
MFC UDT Support
645
5
The COleDataSource Class
646
1
The COleDataObject Class
647
1
MFC Data Object Clipboard Transfer
648
2
The MFC CRectTracker Class
650
2
CRectTracker Rectangle Coordinate Conversion
651
1
The Ex24a Example: A Data Object Clipboard
652
8
The CMainFrame Class
652
1
The CEx24aDoc Class
653
1
The CEx24aView Class
653
7
MFC Drag and Drop
660
2
The Source Side of the Transfer
660
1
The Destination Side of the Transfer
660
1
The Drag-and-Drop Sequence
661
1
The Ex24b Example: OLE Drag and Drop
662
5
The CEx24bDoc Class
662
1
The CEx24bView Class
663
4
Introducing the Active Template Library
667
56
Revisiting COM
667
4
The Core Interface: IUnknown
669
2
Writing COM Code
671
2
COM Classes That Use Multiple Inheritance
672
1
The COM Infrastructure
673
2
ActiveX, OLE, and COM
674
1
ActiveX, MFC, and COM
674
1
An ATL Roadmap
675
2
AtlBase.h
675
1
AtlCom.h
676
1
AtlConv.cpp and AtlConv.h
676
1
AtlCtl.cpp and AtlCtl.h
676
1
AtllFace.idl and AtllFace.h
676
1
Atllmpl.cpp
676
1
AtlWin.cpp and AtlWin.h
677
1
StatReg.cpp and StatReg.h
677
1
Client-side ATL Programming
677
16
C++ Templates
677
2
Smart Pointers
679
2
Giving C++ Pointers Some Brains
681
1
Using Smart Pointers
682
1
Smart Pointers and COM
683
1
ATL's Smart Pointers
684
1
The CComPtrBase Class
684
4
The CComPtr Class
688
2
The CComQlPtr Class
690
2
ATL Smart Pointer Problems
692
1
Server-Side ATL Programming
693
27
ATL and COM Classes
693
1
ATL Project Options
694
3
Creating a Classic ATL COM Class
697
1
Apartments and Threading
698
2
Connection Points and ISupportErrorInfo
700
1
The Free-Threaded Marshaler
701
1
Implementing the Spaceship Class Using Classic ATL
701
2
Basic ATL Architecture
703
1
Managing Vtable Bloat
704
1
ATL's IUnknown: CComObjectRootEx
705
3
ATL and QueryInterface
708
3
Making the Spaceship Go
711
2
Adding Methods to an Interface
713
1
Dual Interfaces
714
2
ATL and IDispatch
716
1
The IMotion and IVisual Interfaces
717
2
Multiple Dual Interfaces
719
1
Attributed Programming
720
3
ATL and ActiveX Controls
723
48
What Are ActiveX Controls?
724
1
Using ATL to Write an ActiveX Control
725
43
Creating a Control
725
5
ATL's Control Architecture
730
6
Developing a Control
736
32
Creating an Attributed Control
768
3
Control Events in Attributed ATL
770
1
The OLE DB Templates
771
34
Why OLE DB?
771
2
The Basic OLE DB Architecture
773
1
The Basic OLE DB Template Architecture
774
9
The OLE DB Consumer Template Architecture
774
3
The OLE DB Provider Template Architecture
777
6
Creating an OLE DB Consumer
783
5
Using the OLE DB Consumer Code
787
1
Creating an OLE DB Provider
788
9
Modifying the Provider Code
795
2
Enhancing the Provider
797
1
Attributed OLE DB Programming
797
8
Part V Programming for the Internet
Internet Essentials
805
44
An Internet Primer
806
11
Network Protocols and Layering
806
1
IP
807
1
UDP
808
1
IP Address Format: Network Byte Order
809
1
TCP
810
2
DNS
812
2
HTTP
814
3
FTP
817
1
Internet vs. Intranet
817
1
Building an Intranet
817
3
NTFS vs. FAT File Systems
818
1
Network Hardware
818
1
Configuring Windows for Networking
819
1
Intranet Host Names and the HOSTS File
819
1
Testing Your Intranet: The Ping Program
819
1
An Intranet for One Computer: The TCP/IP Loopback Address
820
1
Winsock Programming
820
14
Synchronous vs. Asynchronous Winsock Programming
820
1
The MFC Winsock Classes
820
1
The Blocking Socket Classes
821
9
A Simplified HTTP Server Program
830
2
A Simplified HTTP Client Program
832
2
Building a Web Server Using CHttpBlockingSocket
834
3
Ex28a Server Limitations
834
1
Ex28a Server Architecture
834
1
Using the Win32 TransmitFile Function
835
1
Building and Testing Ex28a
836
1
Building a Web Client Using CHttpBlockingSocket
837
1
The Ex28a Winsock Client
837
1
Ex28a Support for Proxy Servers
837
1
Testing the Ex28a Winsock Client
838
1
WinInet
838
6
WinInet's Advantages over Winsock
838
1
The MFC WinInet Classes
839
2
Internet Session Status Callbacks
841
2
A Simplified WinInet Client Program
843
1
Building a Web Client Using the MFC WinInet Classes
844
2
The Ex28a WinInet Client #1: Using CHttpConnection
844
1
Testing the WinInet Client #1
844
1
The Ex28a WinInet Client #2: Using OpenURL
844
1
Testing the WinInet Client #2
845
1
Asynchronous Moniker Files
846
3
Monikers
846
1
The MFC CAsyncMonikerFile Class
846
1
Using the CAsyncMonikerFile Class in a Program
847
1
Asynchronous Moniker Files vs. WinInet Programming
848
1
Introducing Dynamic HTML
849
16
The DHTML Object Model
850
4
Visual C++ .NET and DHTML
854
1
The Ex29a Example: MFC and DHTML
855
1
The Ex29b Example: DHTML and MFC
856
4
The Ex29c Example: ATL and DHTML
860
3
For More Information
863
2
ATL Server
865
22
IIS
865
5
Internet Service Manager
866
1
IIS Security
866
2
IIS Directories
868
2
IIS Logging
870
1
Testing IIS
870
1
ISAPI Server Extensions
870
4
CGI and ISAPI
870
1
A Simple ISAPI Server Extension GET Request
871
1
HTML Forms: GET vs. POST
871
3
Enter ATL Server
874
7
ATL vs. ATL Server
874
1
Where Does ATL Server Fit In?
874
1
The ATL Server Architecture
875
2
SRF Files
877
4
The Ex30a Example: An ATL Server Web Site
881
6
Part VI .NET and Beyond
Microsoft .NET
887
22
Windows Component Technology
887
5
Some Component History
888
1
What's Wrong with DLLs
888
1
The COM Technology
889
1
The Benefits of COM
890
1
The Drawbacks of COM
891
1
The Common Language Runtime
892
17
No Boundaries
892
2
It's All About Type
894
1
Common Language Runtime Types
895
4
The Common Language Specification
899
1
Assemblies
900
3
.NET Versioning
903
1
Living Within the Common Language Runtime
903
3
Threading and the Common Language Runtime
906
1
AppDomains
906
1
Interoperability
907
2
Managed C++
909
18
The Common Language Runtime Is Your Friend
909
1
Why Use C++?
910
2
Managed C++ Extensions
912
2
Visual C++ .NET and the Managed Extensions
914
1
The Ex32a Example: A Managed C++ DLL Assembly
914
7
DaysOfTheWeek
919
1
AManagedValueStruct and AManagedGcStruct
920
1
IAManagedInterface and IPerson
920
1
DotCOMVP, SoftwareDeveloper, and Bum
920
1
AManagedDelegate
920
1
AManagedClass
920
1
Making the Assembly Usable
921
1
The Ex32b Example: A Managed Client Executable
921
4
Adding Managed Extension Support
925
2
Programming Windows Forms Using Managed C++
927
26
Windows Forms
927
24
Beneath the Veneer
928
1
The Windows Forms Structure
928
1
A Windows Forms Wizard
929
3
The Form Class
932
1
Handling Events
933
1
Drawing
934
17
What's Missing from Windows Forms
951
2
Programming ASP.NET Using Managed C++
953
28
The Internet as a Development Platform
953
1
The Evolution of ASP.NET
954
2
The Role of IIS
956
1
ASP.NET's Compilation Model
957
1
The Page Class
957
12
Code-Behind
958
4
Web Forms
962
5
What Happened to ActiveX?
967
2
The HTTP Pipeline
969
7
The HttpContext Object
969
1
The HttpApplication Object
969
1
The HttpModule Object
969
3
The HttpHandler Object
972
4
Web Services
976
5
Web Services Using Managed C++
976
2
WSDL and ASP.NET
978
1
Invoking Web Methods
979
2
Programming ADO.NET Using Managed C++
981
16
Managed Providers
981
2
.NET Managed Providers
982
1
Working with the Providers
983
6
Connecting to the Database
983
3
Issuing Commands
986
1
Using Stored Procedures with a Command
986
1
Using Data Readers to Retrieve Data
987
2
Error Handling
989
1
ADO.NET Datasets
989
8
Using the Data Adapter to Populate Datasets
990
1
Creating In-Memory Datasets
991
2
Writing XML from Datasets
993
4
A Message Map Functions in the MFC Library
997
8
B MFC Library Runtime Class Identification and Dynamic Object Creation
1005
8
Index
1013