Index
D
DAdvise function, 645
data adapters, 982, 990–91
data members. See also fields, in .NET classes
adding, 594
in COM interface example, 537
data readers, 981, 982, 987–89
data source objects, as OLE DB element, 773, 775, 777–78
databases. See also ADO.NET
and attributed programming, 798
Biblio.mdb file, 783, 798–801
managed providers, 981–83
SQL Server vs. OLE DB, 982–83
datagrams, 807–8
DataReader class, 981
DataSet class, 981–82, 989–95
datasets, ADO.NETin-memory, 991–93
overview, 989–90
populating via data adapter, 990–91
writing XML from, 993–95
DataTable class, 990
date and time picker control, 194–95, 200, 201–3
db_accessor OLE DB attribute, 797
db_column OLE DB attribute, 797
db_command OLE DB attribute, 797
db_param OLE DB attribute, 797
db_source OLE DB attribute, 797
db_table OLE DB attribute, 797
DDV_ (validation) function, 153
DDX (Dialog Data Exchange), 221–22, 292–93, 521
DDX_ (exchange) function, 153
Debug modeautomatic object dumping and, 357
overview, 45, 46
vs. Release mode, 45, 46
debugger, Visual C++ .NETEdit And Continue feature, 12
features, 11
overview, 11–12
Variables window, 12
Watch window, 12
window, 12
debuggingDLLs, 500, 603
EXE components, 599
DECLARE_DYNAMIC macro, 357, 360
DECLARE_DYNCREATE macro, 357, 397, 399, 560
DECLARE_INTERFACE_MAP macro, 559
DECLARE_MESSAGE_MAP macro, 281, 282
DECLARE_OLECREATE macro, 560
DECLARE_SERIAL macro, 357, 396, 397
DECLARE_WND_CLASS macro, 733–34
DEF files, 498–99
default status bar, 309
default toolbar, 309
default window rectangle, 342
DEFAULT_REFLECTION_HANDLER macro, 735

DefWindowProc function, 359
_delegate keyword, 913
delegates.NET type overview, 897–98
delete operator, 250
DeleteContents function, 368, 402, 404, 414, 443, 444
DeleteCriticalSection function, 272
DeleteMenu function, 306
descriptor table, 248
destroying CDC objects, 90–91
destroying GDI objects, 93
DestructElements function, 450
destructors vs. finalizers, 906
device contextclasses, 89–92
overview, 41, 89
for printing, 440, 441
states and, 91–92
device coordinates. See also mapping modes
converting parameters, 78–79
CRectTracker conversion, 651
defined, 73
device-independent bitmaps (DIBs)access functions, 118
CDib class, 118–25
display performance, 125
DrawDibDraw function, 129–30
vs. GDI bitmaps, 113–14
LoadImage function, 128–29
overview, 114
palette programming and, 114–15
pixels in, 116
structure within BMP files, 116–17
DHTML. See Dynamic HTML
diagnostic dumping, 355
dialog boxes. See also Windows common dialog boxes
adding controls, 140–44
adding controls at run time, 158
aligning controls, 141
Apply button, 292, 293, 306
as basis for applications, 521–28
dialog boxes, continued
controls and, 136
creating for existing projects, 136–37
modal vs. modeless, 135, 167, 168
nested, 160, 161
overview, 135
as resource, 43, 44–45, 136
sending command messages, 282–83
setting background color, 157–58
setting control colors, 157–58
setting properties, 522–23
sizing and setting properties, 139–40
tabbing order, 144–45
as windows, 135, 136
dialog classcreating, 145–49
dialog resourcebuilding, 138–45, 225
creating and editing, 44–45
defined, 43, 136
DIBs. See device-independent bitmaps
disabling menu commands, 284
disk files. See documents
DispatchMessage function, 263
DISPIDs, 213, 582, 583, 760
display resolution, 74
DisplayFeatures function, 960
displaying fonts, 97–98
displaying property pages, 756–58
DllCanUnloadNow function, 722, 889
DllGetClassObject function, 556, 722, 889
DllMain function, 499, 504–5, 722
DllRegisterServer function, 722, 889
DLLs (dynamic-link libraries)ActiveX controls and, 213
as custom controls, 510–11
debugging, 500, 603
vs. EXE components, 495, 496, 577–79
extension vs. regular, 501–2
file mapping, 247, 253, 254
history, 6, 888
how client programs find, 500
how COM clients call components, 554–56
implicit vs. explicit linkage, 497–98
imported vs. exported functions, 496–97
limitations, 888–89
MFC and, 501–10
MFC COM in-process component example, 562–66
overview, 6, 495–96
role in COM infrastructure, 673
role in ISAPI server extensions, 873
role of instance handles, 499–500
selecting as server-type in ATL Project Wizard, 694–95
symbolic vs. ordinal linkage, 498–99
wizard support for COM components, 560–62, 602
DllUnregisterServer function, 722, 889
DNS (Domain Name System), 812–14
document classdefined, 278
what objects do, 349
documents. See also CDocument class
associating with specific programs, 415–16
double-clicking, 416
loading, 424
storing, 424
vs. views, 349–90, 401
document-view architectureadvanced example, 367–68
applications without, 521–28
interrelationships in SDI applications, 397–405
overview, 27–29
DoDataExchange function, 152–53
DoDragDrop function, 646
Domain Name System (DNS), 812–14
DoModal function, 150, 164, 166, 167, 221, 267, 292, 306
double type, 394
DoVerb function, 746, 753
DoVerbProperties function, 753
drag and dropdestination side of transfer, 660–61
overview, 660
source side of transfer, 660
steps in sequence, 661–62
DragAcceptFiles function, 416
Draw function, 122, 125, 650, 739
Draw method, 950, 951
DrawDibDraw function, 129–30
drawingadding code for bitmaps to ActiveX controls, 736–41
in Windows Forms applications, 934–51
dual interfaces, 639–40, 714–15, 719–20
Dump function, 356–57, 366, 372–73
DWORD type, 394
Dynamic HTML (DHTML)ATL and, 860–62
MFC and, 855–60
object model, 850–54
overview, 849–50
Visual C++ .NET and, 854–55
dynamic memorymanaging, 254
VirtualAlloc function and, 248–49
dynamic splitter windowsoverview, 459
vs. static splitter windows, 459
dynamic subclassing, 359
dynamic-link libraries. See DLLs