Training
Certifications
Books
Special Offers
Community




 
Microsoft® Visual C++® .NET Step by Step--Version 2003
Author Julian Templeman, Andy Olsen
Pages 608
Disk 1 Companion CD(s)
Level Beg/Int
Published 03/26/2003
ISBN 9780735619074
Price $39.99
To see this book's discounted price, select a reseller below.
 

More Information

About the Book
Table of Contents
Sample Chapter
Index
Related Series
Related Books
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books

 

Index


Symbols
& (ampersand)
   & (address of) operator, 33
   & (AND) bitwise operator, 40, 169
   && (AND) logical operator, 39, 68, 169
* (asterisk)
   * (dereference) operator, 33
   * (multiplication) operator, 37, 169
   * (pointer) operator, 32
   *= (multiplication assignment) operator, 38
! (bang)
   ! (not) logical operator, 39, 169
   != (not equal) operator, 39, 169, 173
{ } (braces)
   for enumerations, 34
   for function bodies, 50
[ ] (brackets)
   arrays, 208, 213
   indexed properties, 234
^ (exclusive OR) bitwise operator, 40, 169
: (colon)
   class inheritance, 133
   :: (scope resolution) operator, 92, 273
= (equal sign)
   = (assignment) operator, 30, 37, 169, 177-179
   == (equal to) operator, 39, 169, 173
- (hyphen)
   - (subtraction) operator, 37, 169
   -= (subtraction assignment) operator, 38
   -- (decrement) operator, 38, 169, 179-180
< (left angle bracket)
   < (left shift) operator, 40, 169
   < (less than) operator, 39, 169, 173
   <= (less than or equal) operator, 39, 169, 173
( ) (parentheses), calling functions, 53
% (percent)
   % (modulus) operator, 38, 169
   %= (modulus assignment) operator, 38
| (pipe)
   | (OR) bitwise operator, 40, 169
   || (OR) logical operator, 39, 169
+ (plus sign)
   + (addition) operator, 37, 168, 169
   += (addition assignment) operator, 38
   += (event subscription) operator, 261
   ++ (increment assignment) operator, 38, 169, 179-180
? (question mark) as ternary operator, 40

> (right angle bracket)
   > (greater than) operator, 39, 169, 173
   >= (greater than or equal) operator, 39, 169, 173
   >> (right shift) operator, 40, 169
/ (slash)
   / (division) operator, 37, 169
   /= (division assignment) operator, 38
~ (tilde)
   ~ (complement) operator, 40
   destructor function names, 100

A
Abort value (DialogResult), 323
Abs method (Math), 174
abstract classes, 138
Abstract member (TypeAttributes), 544
AcceptButton property (Form), 292
AcceptsReturn property (TextBox), 312
AcceptsTab property (TextBoxBase), 310
Activate method (Form), 292
Active Template Library (ATL), 288. See also ATL Server library
ActiveForm property (Form), 292
ActiveX controls in Windows Forms projects, 557-560
Add method (ArrayList), 227
addition assignment (+=) operator, 38
addition (+) operator, 37, 168, 169
address of (&) operator, 33
ADO.NET, 282, 451-467
   creating connected applications, 454-459
   creating disconnected applications, 459-466
   data providers, 452
   DataSet class, 459-461, 465-466
   namespaces, list of, 452
   -453
AfterCheck event (TreeView), 333
AfterCollapse event (TreeView), 333
AfterExpand event (TreeView), 333
AfterLabelEdit event (ListView), 342
AfterLabelEdit event (TreeView), 333
AfterSelect event (TreeView), 333
Alignment property (ListView), 340
allocating memory dynamically, 120-128. See also garbage collection
   arrays and, 213-214
   Dispose method, 125-128
   finalizers, 121-124
allocating memory manually, 117-120, 215
Alpha value (colors), 368
ampersand (&)
   & (address of) operator, 33
   & (AND) bitwise operator, 40, 169
   && (AND) logical operator, 39, 68, 169
Anchor property (ToolBar, ToolBarButton), 348, 349
AND (&) bitwise operator, 40, 169
AND (&&) logical operator, 39, 68, 169
AnsiClass member (TypeAttributes), 544
Append member (FileMode), 384
AppendChild method (XmlDocument), 425
AppendChild method (XmlNode), 428
AppendText method
   File class, 389
   FileInfo class, 390
   TextBoxBase class, 311
Application class (System::Windows::Forms), 281, 288
application options, ATL Server, 494
Application property (WebService), 476
application shutdown, finalizers and, 124
ApplicationException class, 187
Application::Run function, 291
applications. See Web applications
ArgumentException class, 187
arithmetic operators, 37-38, 167-171
ArithmeticException class, 187, 192
ArrangeIcons method (ListView), 341
Array class, 216, 218-219
ArrayList class (System::Collections), 225-228, 277
arrays, 31
   collections, 225-231
   enumerators, 224-225
   __gc arrays, 215, 217
   managed arrays, 218-223
   operations on, 219-223
   native arrays, 207-218
      how they work, 210, 213-214
      initializing, 212
      multidimensional, 212-213
      passing to functions, 210-211, 213
   reference types, 216-217
ASP.NET. See ATL Server library; web services
assemblies, 270-271, 453, 561-562
Assembly property (System::Type), 542
AssemblyInfo.cpp file, 530
AssemblyQualifiedName property (System::Type), 542
assigning values to variables, 30
assignment (=) operator, 30, 37, 169, 177-179
associativity, operator, 41, 167
asterisk (*)
   *= (multiplication assignment) operator, 38
   * (dereference) operator, 33
   * (multiplication) operator, 37, 169
   * (pointer) operator, 32
ATL (Active Template Library), 288
ATL Server library, 487-504
   architecture of, 490-491
   Web applications, creating, 493-497
   Web services, creating, 497-504
ATL Server Project Wizard, 494
Attribute node type, 409
AttributeCount property (XmlTextReader), 408, 414
attributes, attaching metadata with, 528-548
   custom, 536-541
      accessing, 545-547
      class design criteria, 538
      defining
   predefined, 530-536
   reflection, 542-547
   XML, 414
Attributes property
   DirectoryInfo class, 388
   System::Type class, 542
   XmlDocument class, 425
   XmlNode class, 427
AttributeTargets enumeration, 537
AttributeUsageAttribute class, 532, 536
AutoCheck property (CheckBox, RadioButton), 304
AutoClass member (TypeAttributes), 544
automatic memory allocation, 120-128. See also garbage collection
   arrays and, 213-214
   Dispose method, 125-128
   finalizers, 121-124
AutoScale property (Form), 292
AutoScroll property (Form), 292
AutoSize property (Label), 301, 302
AutoSize property (TextBoxBase), 310
AxHost class (Forms), 281, 288, 557

B
BackColor property
   Label class, 301
   ListView class, 340
   TextBoxBase class, 310
bang (!)
   != (not equal) operator, 39, 169, 173
   ! (NOT) logical operator, 39, 169
base class, 18. See also inheritance
   accessing members of, 135-137
   creating objects, 138
   defining, 131-133
   interfaces vs., 144-145
   overriding member functions, 140-144
   sealed classes, 144
BaseType property (System::Type), 542
BeforeCheck event (TreeView), 333
BeforeCollapse event (TreeView), 333
BeforeExpand event (TreeView), 333
BeforeLabelEdit event (ListView), 342
BeforeLabelEdit event (TreeView), 333
BeforeSelect event (TreeView), 333
BeginUpdate method
   ComboBox class, 308
   ListBox class, 307
   ListView class, 341
   TreeView class, 333
binary I/O, 396-401
BinaryReader, BinaryWriter classes (System::Diagnostics), 279
BinaryReader, BinaryWriter classes (System::IO), 380, 396-401
BinarySearch method (System::Array), 218
BitArray class (System::Collections), 277
Bitmap class (System::Drawing), 358, 372-373
bitmaps in forms, 372-373
BitVector32 class (System::Collections::Specialized), 278
bitwise operators, 40, 169
Bold property (Font), 369
bool data type, 28
Boolean type, 276
BorderStyle enumeration (System::Windows::Forms), 288
BorderStyle property
   Label class, 301
   ListView class, 340
   TextBoxBase class, 310
   TreeView class, 332
bounds for arrays, 209, 210, 220
__box keyword (managed C++), 513
boxing and unboxing types, 513-515
boxing types, 176
braces
{}
   for enumerations, 34
   for function bodies, 50
brackets [ ]
   arrays, 208, 213
   indexed properties, 234
break statements, 75, 83-84. See also switch statements
browsers
   Web applications from, 497
   Web services from, 479-480
Brush class (System::Drawing), 358, 360-361
Brushes class (System::Drawing), 358
BufferedStream class (System::IO), 380
building executable files, 12
Button class (System::Windows::Forms), 281, 288, 330
button controls (forms), 298-304
buttons on toolbars, 349
ButtonState enumeration (System::Windows::Forms), 288
Byte type, 276

C
C++ templates, 511
call stack, exceptions and, 184
calling functions, 53-61
CallingConvention field (DllImportAttribute), 521
Cancel value (DialogResult), 323
CancelButton property (Form), 292
CanResolveEntity property (XmlValidatingReader), 415
CanUndo property (TextBoxBase), 310
Capacity property (ArrayList), 227
capitalization sensitivity, 4
caret (^) (exclusive OR) bitwise operator, 40, 169
case Hello World program (example), 4
case sensitivity, 4
case statements, 75. See also switch statements
casting, 201
   in C++, 515-517
   operators, 41
catch blocks. See try and catch construct
catching exceptions, 189-198
   constructors and, 193-194
   custom handling, 191-192
   exception class hierarchy, 192-193
   nesting and rethrowing, 194-196
CAtlConverterService class, 500
CCWs (COM Callable Wrappers), 560-561
CDATA node type, 409
char data type, 28
Char type, 276
CharacterCasting property (TextBox), 312
CharSet field (DllImportAttribute), 521
CheckAlign property (CheckBox, RadioButton), 304
CheckBox class (System::Windows::Forms), 281, 288, 330
checkbox controls (forms), 304
CheckBoxes property (ListView), 340
CheckBoxes property (TreeView), 332
Checked property (CheckBox, RadioButton), 304
Checked property (menus), 317
CheckedIndices property (ListView), 340
CheckedItems property (ListView), 340
CheckedListBox class (System::Windows::Forms), 281, 330
CheckState property (CheckBox), 304
ChildNodes property (XmlDocument), 425
ChildNodes property (XmlNode), 427, 431
class keyword, 22
class libraries, 8
Class Library, .NET Framework, 269-270
Class member (TypeAttributes), 544
classes, 19. See also inheritance; objects
   abstract, 138
   accessing base class members, 135-137
   adding variables to, 35-36
   class-wide members, 101-106
   constructors and destructors, 97-101
   declaring, 21
   header and source files, 90-95
   instance members, 101
   interfaces, 144-145
   managed and unmanaged, 90, 508
   overriding member functions, 140-144
   sealed, 144
   structures vs., 156
Clear method
   Graphics class, 361
   ListView class, 341
   System::Array class, 218
   TextBoxBase class, 311
ClearSelected method (ListBox), 307
ClearUndo method (TextBoxBase), 311
Click events (form buttons), 299
ClientSize property (Form), 292
Clipboard class (System::Windows::Forms), 281, 289, 330
Clone method
   System::Array class, 218
   XmlNode class, 428
   XPathNavigator class, 438
CloneNode methods (XmlNode), XmlNode class, 428
Close method
   BinaryReader, BinaryWriter classes, 397
   Form class, 292
   TextReader class, 385
   TextWriter class, 381
   XmlTextReader class, 408
   XmlTextWriter class, 419
CLR (common language runtime), 268, 512
CLS (Common Language Specification), 269
CLSCompliant Attribute class, 532
code, managed, 507-511
code, unmanaged, 507-526
   boxing and unboxing, 513-515
   pinning, 512
   PInvoke to call Win32 API functions, 517-525
code, Web services from, 480-485, 502
code skeleton, Web services (ATL Server), 497
CollapseAll method (TreeView), 333
Collect method (System::GC), 121
collections, 225-231
Collections namespace, 225-226, 277-278
colon (:)
   class inheritance, 133
   :: (scope resolution) operator, 92, 273
Color class (System::Drawing), 358, 368-369
color in forms, 368-369
ColorDialog class (System::Windows::Forms), 281, 289, 328
ColumnClick event (ListView), 342
Columns property (ListView), 340
ColumnWidth property (ListBox), 306
COM (Component Object Model), 471, 549-561
   ActiveX controls with Windows Forms, 557-560
   COM Callable Wrappers (CCWs), 560-561
   COM Interop facility, 549-554
   handling errors, 554-555
   late binding, 555-557
   .NET components as COM components, 560-561
   using objects from .NET code, 550-554
Combine method (System::MulticastDelegate), 254, 255, 259
combo box controls (forms), 305-309
ComboBox class (System::Windows::Forms), 281, 289, 330
ComboBoxStyle enumeration, 308
commands, executing in connected applications, 456-459
CommandText, CommandType properties (OleDbCommand), 456
Comment node type, 409
common dialog boxes, 327-329
common language runtime (CLR), 268, 512
Common Language Specification (CLS), 269
Common namespace (System::Data), 453
Common Type System (CTS), 269
CommonDialog class, 328
ComparePosition method (XPathNavigator), 438
CompareTo method (IComparable), 224
comparison operators. See relational operators
Compile method (XPathNavigator), 438
compiling source files, 8
complement (~) operator, 40
Component class (System::Windows::Forms::Form), 294
Component Object Model. See COM
comprehensibility of object-oriented programming, 19
condition statements. See decision statements; loop statements
ConditionalAttribute class (System::Diagnostics), 532
Configuration namespace (System::Web::Services), 475
connected applications, creating with ADO.NET, 454-459
ConnectionString property (OleDbConnection), 455
const keyword, 33
constants, 33
const_cast operator, 41, 516
constructor functions, 97-99
   exceptions with, 193-194
   for structures, 157
ContainsKey, ContainsValue functions, 230
context menus in forms, 317
Context property (WebService), 476
continue statements, 83-84
Control class (System::Windows::Forms), 281, 294
controls on forms, 300-313
   buttons, 303-304
   checkboxes and radio buttons, 304-305
   dialog boxes, 319-329
      common, 327-329
      data with, 324-327
   directory browsing, 335-339, 343-347
   event handling, 298-300
   labels, 301-303
   list boxes and combo boxes, 305-309
   ListView control, 340-343
   placing, 297-298
   status bars, 353-355
   tab ordering, 327
   text boxes, 310-313
   toolbars, 348-352
converting between data types, 31
Copy method
   File class, 389
   System::Array class, 218, 221
   TextBoxBase class, 311
copying array elements, 221
copying structures, 160
CopyTo method (FileInfo), 390
CopyTo method (System::Array), 218
Count property (ArrayList), 227
cout statements, 5
Create member (FileMode), 384
Create methods
   DirectoryInfo, File classes, 389
   FileInfo class, 390
   XmlDocument class, 425
CreateDirectory method (Directory), 388
CreateNavigator method (XmlNode), 428
CreateNew member (FileMode), 384
CreateSubdirectory method (DirectoryInfo), 389
CreateText method (File, FileInfo), 389-390
creating objects. See instantiating objects
CreationTime property (DirectoryInfo), 388
CTS (Common Type System), 269
Current property (IEnumerator), 224
Cursor class (System::Windows::Forms), 281, 289, 330
custom attributes, 536-541
   accessing, 545-547
   reflection, 542-547
custom exceptions, 198-200
Cut method (TextBoxBase), 311

D
data access API. See ADO.NET
data adapters, 462-465
data formats with Web services, 473
data I/O. See System::IO namespace
data members. See variables
Data namespaces, 282
data providers, ADO.NET, 452
data structures. See arrays
data types, 28-29
   converting between, 31
   return types for functions, 48
   type casting, 41
   typedefs, 35
databases, connecting to (ADO.NET), 454-456
DataColumn class (System::Data), 282, 460
DataGrid class (System::Windows::Forms), 281, 289, 330
DataRow class, 460
DataSet class (System::Data), 282, 459-461, 465-466
DataTable class (System::Data), 282, 460-461
DateTimePicker class (System::Windows::Forms), 281, 289, 330
Debuggable attribute, 188
DebuggableAttribute class (System::Diagnostics), 532
DebuggerHiddenAttribute class (System::Diagnostics), 532
DebuggerStepThroughAttribute class (System::Diagnostics), 532
debugging Web services, 484
Decimal type, 276
decision statements
   if statements, 65-74
   switch statements, 74-77, 162-163
declaring
   arrays, 212
   classes, 21
   function prototypes, 46-49
   loop variables, 80
   scope considerations, 59
   variables, 29-30, 53
decrement (--) operator, 38, 169, 179-180
default
   constructors, 157
   function parameter values, 48
   variable values, 30
default statement, 75. See also switch statements
DefaultPageSettings property (PrintDocument), 374
__delegate keyword, 251, 254
delegates, 249-256
Delete method
   Directory, DirectoryInfo classes, 388-389
   File, FileInfo classes, 389-390
delete operator, 96, 112, 119
   array deletion, 214
   mixed classes, 508
DeleteCommand class, 461
deleting objects. See destroying objects
deployment, 271
Depth property (XmlTextReader), 408
Depth property (XmlValidatingReader), 415
dereference (*) operator, 33
derived classes, 18. See also inheritance
   accessing base class members, 135-137
   defining, 133-135
   overriding member functions, 140-144
Description namespace (System::Web::Services), 475
descriptions, Web services, 474
Design namespace (System::Drawing), 280, 358
designers for forms, 286, 294
DesktopLocation property (Form), 292
destroying objects, 95-97, 118-120
   destructor functions, 99-101, 119, 122
   destructors, defining, 99-101
   dynamic memory management, 120-128
Diagnostics namespace, 278
dialog boxes (forms), 319-329
   common, 327-329
   data with, 324-327
   tab ordering, 327
DialogResult property (Button), 303, 323-324
directories
   browsing in forms, 335-339, 343-347
   getting information about, 387-396
Directory, DirectoryInfo classes (System::Diagnostics), 279
Directory, DirectoryInfo classes (System::IO), 380, 387-396
Directory property (FileInfo), 390
DirectoryName property (FileInfo), 390
DISCO (Discovery of Web Services), 474, 481
disconnected applications, creating with ADO.NET, 459-466
discovery, Web services, 474, 481
Discovery namespace (System::Web::Services), 476
Discovery of Web Services (DISCO), 474, 481
Dispose method, 125-128
   BinaryWriter class, 397
   TextReader class, 385
   TextWriter class, 381
distributed applications. See Web applications; Web services
DivideByZeroException class, 192
divide-by-zero error, 185
division operators, 37-38, 169
DllImportAttribute class, 520-522
DLLs (dynamic link libraries), 533
Document node type, 409
DocumentElement property (XmlDocument), 425
DocumentFragment node type, 409
DocumentName property (PrintDocument), 374
documents, XML. See XML
DocumentType node type, 409
DocumentType property (XmlDocument), 425
DOM (Document Object Model), 424
DomainUpDown class (System::Windows::Forms), 281, 330
double data type, 28, 276
do-while loops, 81-83
downcasting. See casting
Draw methods (System::Drawing::Graphics), 361
drawing. See graphics in forms; System::Drawing namespaces
Drawing namespaces, 280, 358-359
drop-down menus. See menus in Windows Forms
DropDownStyle, DropDownWidth properties (ComboBox), 307
DroppedDown property (ComboBox), 307
dynamic advertising of Web services, 475
dynamic casting, 201
dynamic link libraries (DLLs), 533
dynamic memory allocation, 120-128. See also garbage collection
   arrays and, 213-214
   Dispose method, 125-128
   finalizers, 121-124
dynamic_cast operator, 41, 517

E
editing source files, 8
Element node type, 409
elements of arrays. See arrays
else statements, 69-74. See also if statements
Enabled property (menus), 317
encapsulation, 16-17, 19
Encoding property (XmlTextReader), 408
EndElement, EndEntity node types, 409
EndUpdate method
   ComboBox class, 308
   ListBox class, 307
   ListView class, 342
   TreeView class, 333
EnsureVisible method (ListView), 342
entities, 166
Entity node type, 409
EntityHandling property (XmlValidatingReader), 415
EntityReference node type, 409
EntryPoint field (DllImportAttribute), 521
enum keyword, 34, 161
enumerations, 34, 160-163
   conserving memory, 163
   initial values, setting, 162
enumerators, 224-225
EOF property (XmlTextReader), 408
equal sign (=)
   = (assignment) operator, 30, 37, 169, 177-179
   == (equal to) operator, 39, 169, 173
equality, defined, 174
Equals method (Object), 175-176
ErrorProvider class (System::Windows::Forms), 330
errors
   COM errors, handling, 554-555
   link errors, 8
   properties, 236
   warnings vs., 13
Evaluate method (XPathNavigator), 438
__event keyword, 258, 259
event subscription (+=) operator, 261
events, form, 257-262
ExactSpelling field (DllImportAttribute), 521
Exception class, 187
   class hierarchy, 192-193
   deriving custom types from, 198-200
   properties, list of, 191
exceptions, 183-205
   across languages, 202-204
   attaching objects to, 186
   call stack and, 184
   custom, 198-200
   dynamic casting, 201
   handling, 189-198
      constructors and, 193-194
      customizing, 191-192
      exception class hierarchy, 192-193
      nesting and rethrowing, 194-196
   throwing, 186-189
exclamation point (!)
   ! (NOT) logical operator, 39, 169
   != (not equal) operator, 39, 169, 173
exclusive OR (^) bitwise operator, 40, 169
executable programs. See programs
executing programs, 9, 13
Exists method (Directory, File), 388-389
Exists property (DirectoryInfo, FileInfo), 388, 390
ExpandAll method (TreeView), 333
expressions, 37-43
   arithmetic, 37-38, 167-171
   operator precedence and associativity, 41, 167
extensibility of object-oriented programming, 19
Extensible Stylesheet Language (XSL), 435-436
   style sheet basics, 445
   transforming XML documents with, 444-449
   Xsl namespace (System::XML), 282
Extension property (DirectoryInfo), 388

F
fall-through (switch statements), 76-77
FieldOffsetAttribute class, 522
File, FileInfo classes (System::Diagnostics), 279
File, FileInfo classes (System::IO), 380, 389-396
FileAccess enumeration, 384
FileDialog class (System::Windows::Forms), 281, 328
FileMode enumeration, 384
files
   getting information about, 387-396
   System::IO namespace, 379-380. See also System::IO namespace
FileShare enumeration, 384
FileStream, FileStreamInfo, FileStreamWatcher classes (System::Diagnostics), 279
FileStream, FileStreamInfo, FileStreamWatcher classes (System::IO), 380, 383-384
Fill methods (System::Drawing::Graphics), 361
FillBuffer method (BinaryWriter), 397
Finalize method (System::Object), 121-128
finalizers, 121-128
__finally block, 196-197
FindString, FindStringExact methods (ComboBox), 308
FindString, FindStringExact methods (ListBox), 307
FirstChild property (XmlDocument), 425
FirstChild property (XmlNode), 427
FlagsAttribute class, 532
FlatStyle property (Button, Label), 301, 303
float data type, 28
floating-point types, 276
Flush method
   BinaryWriter class, 397
   TextWriter class, 381
   XmlTextWriter class, 419
FocusedItem property (ListView), 340
FolderBrowserDialog class (System::Windows::Forms), 328
fonts in forms, 369-372
   Font class (System::Drawing), 358, 369-372
   Font property (Label), 301, 302
   FontDialog class (System::Windows::Forms), 328
   FontFamily class (System::Drawing), 358, 369-372
   FontStyle enumeration, 370
for loops, 79-81
ForeColor property
   Label class, 301, 302
   ListView class, 340
   TextBoxBase class, 310
Form class (System::Windows::Forms), 281, 289, 292-296
Formatting property (XmlTextWriter), 419
formatting XML, 419-424
FormBorderStyle property (Form), 292
forms. See Windows Forms
free-format languages, 6
FromFile method (Bitmap), 372
FromHbitmap method (Bitmap), 372
FromStream method (Bitmap), 372
FullName property (DirectoryInfo), 388
FullName property (System::Type), 542
FullRowSelect property (ListView), 340
FullRowSelect property (TreeView), 332
fully qualified names, 273
function headers, 49
function pointers, 250. See also delegates
functions, 5, 45-64
   calling, 53-61
   class-wide member functions, 105-106
   constructors and destructors, 97-101
   declaring prototypes, 46-49
   defining function bodies, 49-53
   delegates, 249-256
   inline functions, 91
   instance members, 101
   overloading, 61-62, 165-182
      constructors, 98
      important guidelines, 181
      operators, 171-180
      reference types, 180-181
      value types, 167-171
   overriding, 140-144
   passing native arrays to, 210-211, 213
   return types, 48, 52, 97

G
GAC (Global Assembly Cache), 562
garbage collection, 22, 120-128
   arrays and dynamic allocation, 213-214
   destructors and, 99
   Dispose method, 125-128
   finalizers, 121-124
   mixed classes, 508
   objects of unmanaged classes, 96
   traditional memory management vs., 117-120, 215
__gc keyword, 22, 90, 160, 216
__gcc arrays, 215, 217
GCHandle type, 509-511
GDI+ (Graphical Device Interface), 357. See also graphics in forms
generations of objects, 121
GET commands (HTTP), 473, 480
get methods. See scalar properties
GetAttribute method (XmlTextReader), 408
GetAttribute method (XPathNavigator), 438
GetAttributes method (File), 389
GetByIndex method (SortedList), 230
GetConstructor, GetConstructors methods (System::Type), 543
GetCreationTime method (Directory, File), 388-389
GetCurrentDirectory method (Directory), 388
GetCustomAttribute, GetCustomerAttributes methods, 545-547
GetDirectories method (Directory, DirectoryInfo), 388-389
GetDirectoryRoot method (Directory), 388
GetElementById method (XmlDocument), 426
GetElementsByTagName method (XmlDocument), 426
GetEnumerator method (System::Array), 218, 224-225
GetEnumerator method (XmlNode), 428
GetEvent, GetEvents methods (System::Type), 543
GetField, GetFields methods (System::Type), 543
GetFiles method (Directory, DirectoryInfo), 388-389
GetFileSystemEntries method (Directory), 388
GetFileSystemInfos method (DirectoryInfo), 389
GetInterface, GetInterfaces methods (System::Type), 543
GetInterfaceMap method (System::Type), 543
get_item method (ArrayList), 227
get_Item method (SortedList), 230
GetItemAt method (ListView), 342
GetItemRect method (ListView), 342
GetLastAccessTime method (Directory, File), 388-389
GetLastWriteTime method (Directory, File), 388-389
GetLength method (System::Array), 219, 220
GetLogical Drives method (Directory), 388
GetLowerBound method (System::Array), 219, 220
GetMember, GetMembers methods (System::Type), 543
GetNamespace method (XPathNavigator), 438
GetNodeAt method (TreeView), 333
GetNodeCount method (TreeView), 333
GetParent method (Directory), 388
GetProperty, GetProperties methods (System::Type), 543
GetSelected method (ListBox), 307
GetType method (System::Type), 543
GetTypeFromCLSID, GetTypeFromProgID methods (System::Type), 543
GetUpperBound method (System::Array), 219, 220
GetValue method (System::Array), 219, 221
Global Assembly Cache (GAC), 562
global scope, 59
Graphics class (System::Drawing), 358-360
   drawing methods, 361-364
   Paint events, 365-368
graphics in forms, 280, 357-377
   Brush class, 360-361
   color, 368-369
   fonts, 369-372
   images and bitmaps, 372-373
   Pen class, 360-361
   printing functionality, 373-376
   System::Drawing namespaces, 358-359
GraphicsUnit enumeration, 370
greater than operators, 39, 169, 173
GridLines property (ListView), 341
grouping radio buttons (forms), 305
GUID property (System::Type), 542

H
handling exceptions, 189-198. See also exceptions
   custom handling, 191-192
   nesting and rethrowing, 194-196
HasAttributes property(XPathNavigator), 437
HasChildNodes property (XmlDocument), 425
HasChildNodes property (XmlNode), 427
HasChildren property (XPathNavigator), 437
Hashtable class (System::Collections), 225, 277
HasSecurity member (TypeAttributes), 544
HasValue property (XmlTextReader), 408
header files for classes, 90-95
HeaderStyle property (ListView), 341
Height property (Bitmap), 372
Height property (Font), 369
Hello World, case program (example), 4
Help class (System::Windows::Forms), 330
HelpButton property (Form), 292
HideSelection property
   ListView class, 341
   TextBoxBase class, 310
   TreeView class, 332
hierarchical menus, 317. See also menus in Windows Forms
hierarchy of exception classes, 192-193
HorizontalResolution property (Bitmap), 372
HorizontalScrollbar property (ListBox), 306
HotTracking property (TreeView), 332
HoverSelection property (ListView), 341
HScrollBar class (System::Windows::Forms), 289
HTML, transforming XML into, 436
HtmlControls namespace (System::Web::UI), 283
HTTP GET and POST commands, 473, 480
HttpRequest, HttpResponse classes (System::Web), 283
hyphen (-)
   - (subtraction) operator, 37, 169
   -= (subtraction assignment) operator, 38
   -- (decrement) operator, 38, 169, 179-180

I
IClonable interface (System::Collections), 228
ICollection interface (System::Collections), 228, 278
IComparable interface (System::Collections), 224
IComparer interface (System::Collections), 229, 278
Icon class (System::Drawing), 358
Icon property (Form), 293
IConnectionPoint, IConnectionPointContainer interfaces (COM), 552
identifiers, 7
IDictionary, IDictionaryEnumerator interfaces (System::Collections), 278
IDispatch, IDispatchEx interfaces (COM), 551-552
IDisposable interface, 125-128
IEnumerable, IEnumerator interfaces (System::Collections), 224, 228, 278
IEnumVARIANT interface (COM), 552
IErrorInfo interface (COM), 551
if statements, 65-74
   multiway decision testing, 69-72
   nesting, 72-74
Ignore value (DialogResult), 323

IHashCodeProvider interface (System::Collections), 278
IL (intermediate language), 268
ILDASM, viewing metadata with, 528
IList interface (System::Collections), 228, 278
Image base class (System::Drawing), 358, 372
Image property
   Button class, 303
   CheckBox, RadioButton classes, 304
   Label class, 301, 302
ImageAlign property
   Button class, 303
   CheckBox, RadioButton classes, 304
   Label class, 301
ImageIndex property (Label), 301
ImageIndex property (TreeView), 332
ImageList class (System::Windows::Forms), 289, 330
ImageList property (Label), 301, 302
ImageList property (TreeView), 332
images in forms, 372-373
Imaging namespace (System::Drawing), 280, 358
Import member (TypeAttributes), 544
ImportNode method (XmlDocument), 426
#include directive, 4, 134
increment (++) operator, 38, 169, 179-180
Indent property (TreeView), 332
Indentation, IndentChar properties (XmlTextWriter), 419
indenting code, 6
indexed properties, 234, 239, 245-247
IndexOf method (System::Array), 219, 222
IndexOutOfRangeException class, 187
inequality, defined, 174
inheritance, 17, 20, 129-147
   accessing base class members, 135-137
   base class, defining, 131-133
   derived classes, defining, 133-135
   hierarchy, designing, 130-131
   interfaces, using, 144-145
   overriding member functions, 140-144
initial values
   enumeration members, 162
   member initialization lists, 99
   variables, 29
Initialize method (System::Array), 219
initializing arrays, 212
inline functions, 91
InnerText, InnerXml properties (XmlDocument), 425
InnerText, InnerXml properties (XmlNode), 427
Insert method (ArrayList), 227
InsertAfter, InsertBefore methods (XmlDocument), 426
InsertAfter, InsertBefore methods (XmlNode), 428
InsertCommand class, 461
installing assemblies, 562
instance members, 101
instantiating objects, 22, 95-99
   inheritance hierarchy and, 138-139
   memory management, 117, 120
int, int8, int16, int32, int64 data types, 28, 276
IntegralHeight property (ComboBox, ListBox), 306-307
Interface member (TypeAttributes), 544
interfaces, 144-145, 498-500
intermediate language (IL), 268
Internet Server API (ISAPI), 489
InteropServices namespace (System::Runtime), 507
IntPtr type, 276
InvalidCastException class, 187
Invoke method (System::MulticastDelegate), 252, 255, 259
InvokeMember method (System::Type), 543
I/O functionality, .NET Framework, 279. See also System::IO namespace
IO namespace, 279, 379-380
IOException class (System::Diagnostics), 279
IOException class (System::IO), 380
IProvideClassInfo interface (COM), 551
IsAbstract property (System::Type), 542
ISAPI (Internet Server API), 489
IsArray, IsByRef, IsClass properties (System::Type), 542-543
IsCOMObject property (System::Type), 543
IsDefault property (Button), 303
IsDescendant method (XPathNavigator), 438
IsEmptyElement property (XmlTextReader), 408
IsEmptyElement property (XPathNavigator), 437
IsFixedSize property (System::Array), 218
IsInputKey method (ListView), 342
IsInterface property (System::Type), 543
IsReadOnly property
   System::Array class, 218
   XmlDocument class, 425
   XmlNode class, 427
IsSamePosition method (XPathNavigator), 438
IsStartElement method (XmlTextReader), 408
IsSynchronized property (System::Array), 218
IsValueType property (System::Type), 543
Italic property (Font), 369
Item property (XmlNode), 427
Item property (XmlTextReader), 408
ItemActivate event (ListView), 342
ItemCheck event (ListView), 342
ItemDrag event (ListView), 342
ItemDrag event (TreeView), 333
Items property
   ComboBox class, 307
   ListBox class, 306
   ListView class, 341
IUnknown interface (COM), 551

K
keywords (reserved words), 7
KnownColor enumeration, 368

L
Label class (System::Windows::Forms), 281, 289, 330
label controls (forms), 301-303
LabelEdit property (ListView), 341
LabelEdit property (TreeView), 332
LabelWrap property (ListView), 341
LargeImageList property (ListView), 341
LastAccessTime property (DirectoryInfo), 388
LastChild property (XmlDocument), 425
LastChild property (XmlNode), 427
LastIndexOf method (System::Array), 219, 222
LastWriteTime property (DirectoryInfo), 388
late binding to COM objects, 555-557
leaking memory, 119, 215
left angle bracket (<)
   < (less than) operator, 39, 169, 173
   <= (less than or equal) operator, 39, 169, 173
   << (left shift) operator, 40, 169
left shift (<<) operator, 40, 169
Length property (FileInfo), 390
Length property (System::Array), 218, 219
less than operators, 39, 169, 173
lifetime, object. See garbage collection
LineNumber, LinePosition properties (XmlTextReader), 408
Lines property (TextBoxBase), 310
linking object files, 8
LinkLabel class (System::Windows::Forms), 330
list box controls (forms), 305-309
ListBox class (System::Windows::Forms), 281, 289, 330
ListDictionary class (System::Collections::Specialized), 278
ListView class (System::Windows::Forms), 281, 289, 330, 347
ListView control (forms), 340-343
literal constants, 33
Load method (XmlDocument), 426
LoadXML method (XmlDocument), 426
local scope, 59
local variables within functions, 53
LocalName property
   XmlDocument class, 425
   XmlNode class, 427
   XmlTextReader class, 408
   XPathNavigator class, 437
logical operators, 39, 169, 173-175
long data type, 28
LookupPrefix method (XmlTextWriter), 419
loop statements, 77-84
   do-while loops, 81-83
   for loops, 79-81
   unconditional jumps, 83-84
   while loops, 77-79

M
Mail namespace (System::Web), 283
main function, 6
MainMenu class, 314
managed arrays, 216, 218-225
managed C++ exceptions, 186
managed classes, 90. See also classes
managed code, 268
   inheritance in, 131. See also inheritance
   operator overloading, 165
   sealed classes, 144
   unmanaged code vs., 507-511
managed exceptions. See exceptions
managed heap, 121
managed structs. See structures
manual memory allocation, 117-120, 215
marshaling, 518
Matches method (XPathNavigator), 438
Math::Abs method, 174
MaxDropDownItems property (ComboBox), 307
MaximizeBox property (Form), 293
MaxLength property (ComboBox), 307
MaxLength property (TextBoxBase), 310
member initialization lists, 99
MemberAccessException class, 187
memory
   enumerations and, 163
   leakage, 119, 215
   management of. See garbage collection
   MemoryStream class (System::Diagnostics), 279
   MemoryStream class (System::IO), 380
Menu class (System::Windows::Forms), 289, 330
Menu property (Form), 293
MenuItem class, 314
menus in Windows Forms, 314-318
message loops, 291
Message property (Exception class), 191
MessageBox class (System::Windows::Forms), 289, 330
metadata, 271-273, 527-548
   custom attributes
      accessing, 545-547
      class design criteria, 538
      defining, 536-541
      properties, 537
   predefined attributes, 530-536
      AssemblyInfo.cpp file, 530
      classes for, 531-536
   reflection to get attribute data, 542-547
methods, visibility of, 21
MFC (Microsoft Foundation Class) library, 287
Microsoft Intermediate Language (MSIL), 268
MinimizeBox property (Form), 293
mixed classes, 508
Modified property (TextBoxBase), 311
Module property (System::Type), 543
modulus assignment (%=) operator, 38
modulus (%) operator, 38, 169
MonthCalendar class (System::Windows::Forms), 330
more than. See greater than
operators
Move method (Directory, File), 388-389
MoveNext method (IEnumerator), 224
MoveTo methods
   DirectoryInfo class, 389
   FileInfo class, 390
   XmlTextReader class, 408, 414
   XPathNavigator class, 438
MSIL (Microsoft Intermediate Language), 268
MTAThreadAttribute class, 532
multicast delegates, 253-256
MultiColumn property (ListBox), 306
multidimensional arrays, 212-213, 217
Multiline property (TextBoxBase), 311
multiplication operators, 37-38, 169
MultiSelect property (ListView), 341
multiway decision testing, 70-72
MustOverride keyword (Visual Basic), 141

N
Name property
   DirectoryInfo class, 388
   FileInfo class, 390
   Font class, 369
   XmlDocument class, 425
   XmlNode class, 427
   XmlTextReader class, 408, 412
   XPathNavigator class, 437
names
   assemblies, 561
   constructor functions, 97
   destructor functions, 100
   function parameters, 47
   get and set methods, 237
   interfaces, 145
   namespaces, 273
   variables, 30
Namespace property (System::Type), 543
namespaces, .NET Framework, 273-283. See also specific namespaces
Namespaces property (XmlTextReader), 408
Namespaces property (XmlTextWriter), 419
NamespaceURI property (XmlTextReader), 408
NameValueCollection class (System::Collections::Specialized), 278
native arrays. See arrays
nesting
   exceptions, 194-196
   if statements, 72-74
   structures, 157-160
.NET Framework. See also Windows Forms; XML
   basic components, 267-273
   components as COM components, 560-561. See also COM
   data providers, 452
   delegates, 249-256
   events, 257-262
   namespaces, 273-283. See also specific namespaces
   reference and value types, 151-153
   structures, 153-163
      copying, 160
      implementing constructors for, 157
      nested, 157-160
   using services without, 484
.NET Framework Class Library, 269-270
Net namespace, 281
Net::Sockets namespace, 281
new operator, 22, 96
   array creation, 213
   memory management and, 117, 120
NextSibling property (XmlNode), 427
No value (DialogResult), 323
Node events (XmlDocument), 426
nodes, XML, 427-434
Nodes property (TreeView), 332
NodeType property
   XmlDocument class, 425
   XmlNode class, 427
   XmlTextReader class, 408
   XPathNavigator class, 437
__nogc keyword, 216
None member (FileShare), 384
None node type, 409
None value (DialogResult), 323
NonSerializedAttribute class, 532
Normalize method (XmlNode), 428
not equal (!=) operator, 39, 169, 173
NOT (!) logical operator, 39, 169
Notation node type, 409


NotPublic member (TypeAttributes), 544
NotSupportedException class, 187
NullReferenceException class, 187
NumericUpDown class (System::Windows::Forms), 330

O
object files, linking, 8
Object::Equals method (Object), 175-176
object-oriented programming, 15-19. See also classes; inheritance; objects
objects, 19. See also classes
   attaching to exceptions, 186
   constructors and destructors, defining, 97-101
   defining relationships between, 107-113
   destroying, 95-97, 118-120
   dynamic memory management, 120-128
   instance members, 101
   instantiating (creating), 22, 95-97
      inheritance hierarchy and, 138-139
      memory management, 117, 120
Obsolete attribute, 533
ObsoleteAttribute class, 532-536
Odbc namespace (System::Data), 453
OK value (DialogResult), 323
OleDb namespace and classes (System::Data), 453-459
one-way decision testing, 65-69
OOP. See object-oriented programming
Open member (FileMode), 384
Open method (File, FileInfo), 389-390
OpenFileDialog class (System::Windows::Forms), 328
OpenOrCreate member (FileMode), 384
OpenRead, OpenText, OpenWrite methods (File, FileInfo), 389, 390
operations on managed arrays, 219-223
   copying array elements, 221
   searching among elements, 222
   sorting elements, 223
operator keyword, 170
operators, 37-43
   overloading, 165-182
      important guidelines, 181
      increment and decrement operators, 179-180
      logical and relational operators, 173-175
      operator functions, 171-173
      reference types, 180-181
      value types, 167-171
   precedence and associativity, 41, 167
op_ functions. See also overloading functions
   increment and decrement operators, 179-180
   logical and relational operators, 173-175
   op_Assign function, 177-179
   overloading, 171-173
   value types, 169
OR operators, 39-40, 169
OracleClient namespace (System::Data), 453
ordering array elements, 223
OuterXml property (XmlNode), 427
OutOfMemoryException class, 187
OverflowException class, 192
overloading functions, 61-62, 165-182
   constructors, 98
   guidelines, 181
   operators, 171-180
   reference types, 180-181
   value types, 167-171
overriding functions, 140-144
OwnedForms property (Form), 293
OwnerDocument property (XmlDocument), 425
OwnerDocument property (XmlNode), 427
ownership, form, 296-297

P
PageSettings class (Printing namespace), 374
PageSetupDialog class (System::Windows::Forms), 328
Paint events, 365-368
Palette property (Bitmap), 372
Panel class (System::Windows::Forms), 281, 289, 330
panels on status bars, 354
ParamArrayAttribute class, 532
parameters, function, 47, 50
parent classes, 17. See also inheritance
Parent property (DirectoryInfo), 388
parentheses ( ), calling functions, 53
ParentNode property (XmlDocument), 425
ParentNode property (XmlNode), 427
parsing XML, 407-418
PasswordChar property (TextBox), 312
Paste method (TextBoxBase), 311
Path class (System::Diagnostics), 279
Path class (System::IO), 380
PDF, transforming XML into, 436
Peek method (TextReader), 385
PeekChar method (BinaryWriter), 397
Pen, Pens classes (System::Drawing), 358, 360-361
percent (%)
   % (modulus) operator, 38, 169
   %= (modulus assignment) operator, 38
performance. See also garbage collection
   memory leakage, 119, 215
   reference types, 22
   


PictureBox class (System::Windows::Forms), 330
_pin keyword (managed C++), 512
pinning pointers, 512
PInvoke mechanism, 517-525
pipe (|)
   | (OR) bitwise operator, 40, 169
   || (OR) logical operator, 39, 169
PixelFormat property (Bitmap), 372
placing controls on forms, 297-298
plus sign (+)
   + (addition) operator, 37, 168, 169
   += (addition assignment) operator, 38
   += (event subscription) operator, 261
   ++ (increment) operator, 38, 169, 179-180
Point, PointF classes (System::Drawing), 358
pointers, 32
   arrays vs., 210
   defining object relationships, 107-113
   function pointers, 250
   pinning (unmanaged code), 512
polymorphism, 18, 129, 140-144
POST commands (HTTP), 473
#pragma once directive, 132
precedence, operator, 41, 167
predefined attributes, 530-536
PreferredHeight property
   Label class, 301
   ListBox class, 306
   TextBoxBase class, 311
PreferredWidth property (Label), 301
Prefix property
   XmlNode class, 427
   XmlTextReader class, 408
   XPathNavigator class, 437
PrependChild method (XmlNode), 428
PreserveSigfield (DllImportAttribute), 521
PreserveWhitespace property (XmlDocument), 425
PreviousSibling property (XmlNode), 427
PrintController property (PrintDocument), 374
PrintDialog class (System::Windows::Forms), 328, 375
PrintDocument class (System::Drawing::Printing), 374
PrinterSettings class (Printing namespace), 374
printing functionality in forms, 373-376
Printing namespace (System::Drawing), 280, 358, 373-376
private (access modifier), 21, 133, 135
ProcessingInstruction node type, 409
programs, 8-13
ProgressBar class (System::Windows::Forms), 289, 330
projects, 9
   adding source files, 11
   ATL Server project settings, 494
properties, 233-247
   attributes, 537
   errors in, 236
   forms, 291-296
   indexed properties, 234, 239, 245-247
   read-only, write-only, 237-238
   scalar properties, 234, 235-238
Property Editor (Windows Forms), 294
__property keyword, 235
PropertyGrid class (System::Windows::Forms), 330
protected (access modifier), 135
Protocols namespace (System::Web::Services), 476
prototype functions, declaring, 46-49
proxy code for Web services, 484
public (access modifier), 21, 133, 135
Public member (TypeAttributes), 544
publishing events. See events,
form
pull and push models, 407
pure virtual functions, 141, 144-145

Q
question mark (?) as (ternary) operator, 40
Queue class (System::Collections), 225, 277
QuoteChar property (XmlTextWriter), 419

R
radio button controls (forms), 304-305
RadioButton class (System::Windows::Forms), 289, 330
rank, array, 219
Rank property (System::Array), 218, 219
RCWs (Runtime Callable Wrappers), 550-560
   ActiveX controls in Windows Forms projects, 557-559
   COM errors, handling, 554-555
   late binding, 555-557
Read member (FileAccess, FileShare), 384
Read methods
   BinaryWriter class, 397
   TextReader class, 385
   XmlTextReader, 409
Reader property (XmlValidatingReader), 415
ReadNode method (XmlDocument), 426
read-only properties, 237-238
ReadOnly property (TextBoxBase), 311
ReadState property (XmlTextReader), 408
ReadTypedValue method (XmlTextReader), 415
ReadWrite member (FileAccess, FileShare), 384
Rectangle, RectangleF classes (System::Drawing), 358


reference types, 22, 151
   arrays of, 216-217
   boxing value types as, 176, 513-515
   overloading, 180-181
references, 33
reflection, 542-547
Region class (System::Drawing), 358
reinterpret_cast operator, 41, 517
relational operators, 39, 173-176
relationships between forms, 296-297
relationships between objects, 107-113
remainder operators, 38, 169
Remove method (System::MulticastDelegate), 254, 256, 259
RemoveAll method (XmlDocument), 426
RemoveAll method (XmlNode), 428
RemoveAt method (ArrayList), 228
RemoveByIndex method (SortedList), 230
RemoveChild method (XmlDocument), 426
RemoveChild method (XmlNode), 428
RemoveRange method (ArrayList), 228
RenderTransparent property (Label), 301
ReplaceChild method (XmlDocument), 426
ReplaceChild method (XmlNode), 428
reserved words (keywords), 7
Reset method (IEnumerator), 224
resizing arrays, 208
resource management. See garbage collection
rethrowing exceptions, 195-196
Retry value (DialogResult), 323
return keyword, 50, 52
return types, 48, 52, 97
reusability of object-oriented programming, 19
Reverse method (System::Array), 219, 223
reversing array element order, 223
RichTextBox class (System::Windows::Forms), 281, 330
right angle bracket (>)
   > (greater than) operator, 39, 169, 173
   >= (greater than or equal) operator, 39, 169, 173
   >> (right shift) operator, 40, 169
right shift (>>) operator, 40, 169
Root property (DirectoryInfo), 389
RotateFlip method (Bitmap), 372
RTF, transforming XML into, 436
Run function (Application), 291
running programs, 9, 13
Runtime Callable Wrappers (RCWs), 550-560
   ActiveX controls in Windows Forms projects, 557-560
   handling COM errors, 554-555
   late binding, 555-557

S
Save method (Bitmap), 372
Save method (XmlDocument), 426
SaveFileDialog class (System::Windows::Forms), 328
SByte type, 276
scalar properties, 234-238
Schema namespace (System::XML), 282
Schemas property (XmlValidatingReader), 415
SchemaType property (XmlValidatingReader), 415
scope, variable, 59
scope resolution (::) operator, 92, 273
Scrollable property (ListView), 341
Scrollable property (TreeView), 332
ScrollAlwaysVisible property (ListBox), 306
ScrollBar class (System::Windows::Forms), 330
ScrollBars property (TextBox), 312
ScrollToCaret method (TextBoxBase), 311
sealed classes, 144
__sealed keyword, 144
Sealed member (TypeAttributes), 544
searching array elements, 222
security, 144, 271, 283
Seek method (BinaryWriter), 397
Seek method (Stream), 401
seek pointers, 401
SeekOrigin enumeration, 401
SEH (Structured Exception Handling), 186
Select methods
   ComboBox class, 308
   TextBoxBase class, 311
   XPathNavigator class, 438
SelectAll method (ComboBox), 308
SelectAll method (TextBoxBase), 311
SelectCommand class, 461
SelectedImageIndex property (TreeView), 332
SelectedIndex property (ComboBox, ListBox), 306, 307
SelectedIndexChanged event (ListView), 342
SelectedIndices property (ListBox), 306
SelectedIndices property (ListView), 341
SelectedItem property (ComboBox, ListBox), 306, 307
SelectedItems property (ListBox), 306
SelectedItems property (ListView), 341
SelectedNode property (TreeView), 332
SelectedText property (ComboBox), 307
SelectedText property (TextBoxBase), 311
SelectionLength property (ComboBox), 308
SelectionLength property (TextBoxBase), 311
SelectionMode property (ListBox), 306
SelectionStart property (ComboBox), 308
SelectionStart property (TextBoxBase), 311
SelectNodes, SelectSingleNode methods (XmlDocument), 426
SelectNodes, SelectSingleNode methods (XmlNode), 428
Serializable member (TypeAttributes), 544
SerializableAttribute class, 532
Serialization namespace (System::Xml), 282
server options, ATL Server, 494
Server property (WebService), 476
Server Response Files (SRFs), 490-492
service types, 166
services. See Web services
Services namespace (System::Web), 283
Session property (WebService), 476
set methods. See scalar properties
SetAttributes method (File), 390
SetCreationTime method (Directory, File), 388, 390
SetCurrentDirectory method (Directory), 388
SetDesktopLocation method (Form), 293
set_item method (SortedList), 230
SetLastAccessTime method (Directory, File), 388, 390
SetLastError field (DllImportAttribute), 521
SetLastWriteTime method (Directory, File), 388, 390
SetSelected method (ListBox), 307
SetValue method (System::Array), 219, 220
shared assemblies, 562
short data type, 28
Show method (MessageBox), 299
ShowDialog method (Form), 293, 320
ShowInTaskBar property (Form), 293
ShowLines property (TreeView), 333
ShowPanels property (StatusBar), 354
ShowPlusMinus property (TreeView), 333
ShowRootLines property (TreeView), 333
shutting down, finalizers and, 124
SignificantWhitespace node type, 409
signing assemblies, 561
Single type, 276
size, arrays, 208, 219
Size property
   Bitmap class, 372
   Font class, 369
   Form class, 293
   System::Drawing namespace, 358
SizeF class (System::Drawing), 358
SizeGripStyle property (Form), 293
SizeInPoints property (Font), 369
sizeof() operator, 41
sizing grip, status bars, 354
slash (/)
   / (division) operator, 37, 169
   /= (division assignment) operator, 38
SmallImageList property (ListView), 341
SOAP (Simple Object Access Protocol), 473
SolidBrush class (System::Drawing), 358
Sort method (System::Array), 219, 223
Sorted property
   ComboBox class, 308
   ListBox class, 306
   TreeView class, 333
SortedList class (System::Collections), 225, 228-230, 277
sorting array elements, 223
Sorting property (ListView), 341
source files, 8-12, 90-95
Source property (Exception class), 191
spaces within code, 6
Specialized namespace (System::Collections), 225-226, 277-278
Splitter class (System::Windows::Forms), 289, 330, 347
SQL commands, executing in connected applications, 456-459
SqlClient, SqlTypes namespaces (System::Data), 453
SRFs (Server Response Files), 490-492
Stack class (System::Collections), 226, 277
StackTrace property (Exception class), 191
StateImageList property (ListView), 341
STAThreadAttribute class, 532
static advertising of Web services, 474
static keyword, 103, 105
static_cast operator, 41, 516
status bar controls (forms), 353-355
Status class (System::Windows::Forms), 289
StatusBar class (System::Windows::Forms), 281, 331, 353-355
Stream class (System::Diagnostics), 279, 401
Stream class (System::IO), 380
StreamReader, StreamWriter classes (System::Diagnostics), 279
StreamReader, StreamWriter classes (System::IO), 380, 381
Strikeout property (Font), 369
String class, 36
String classes (System::Collections::Specialized), 226, 230-231, 278
StringFormat class (System::Drawing), 359
StringReader, StringWriter classes (System::Diagnostics), 279
StringReader, StringWriter classes (System::IO), 380
strong typing, 3
Stroustrup, Bjarne, 131, 170
struct keyword, 154
StructLayoutAttribute class, 522
Structured Exception Handling (SEH), 186
structures, 153-160
Style property (Font), 370
style sheets, XML. See XSL
subclasses. See derived classes
subroutines, 46
subscribing to events. See events
, forms
subtraction operators, 37, 169
superclass. See base class
Supports method (XmlNode), 428
switch statements, 74-77, 162-163
symbolic constant, 33
Synchronized method (TextReader), 385
Synchronized method (TextWriter), 381
SyncRoot property (System::Array), 218
system libraries, 8
System namespace, 275
System::Array class, 216, 218-219
SystemBrushes class (System::Drawing), 359
System::Collections class, 225-226, 277-278
SystemColors class (System::Drawing), 359
System::Data namespaces, 282, 453
System::Diagnostics namespace, 278
System::Drawing namespaces, 280, 358-359
   Brush class, 360-361
   Color class, 368-369
   Font, FontFamily classes, 369-372
   Graphics class, 359-368
   Image and Bitmap classes, 372-373
   Pen class, 360-361
   Printing namespace, 373-376
System::Enum class, 160
SystemException class, 187
System::Exception class. See Exception class; exceptions
SystemIcons class (System::Drawing), 359
System::IO namespace, 279, 379-380
   binary I/O, 396-401
   files and directories, 387-396
   text I/O, 381-387
System::MulticastDelegate class, 254
System::Net namespace, 281
System::Net::Sockets namespace, 281
SystemPens class (System::Drawing), 359
System::Reflection namespace, 545
System::Runtime::InteropServices namespace, 507
System::Type class, 542-544
System::ValueType class, 153
System::Web namespaces, 283
System::Web::Services namespaces, 475
System::Windows::Forms namespace, 280, 288-289, 292-296. See also Windows Forms
System::XML namespaces, 282, 406. See also XML

T
tab ordering in dialog boxes, 327
TabControl class (System::Windows::Forms), 331
TabIndex property (form controls), 327
TabPage class (System::Windows::Forms), 331
TabStop property (Label), 301, 302
targets, attribute, 536
templates in C++, 511
ternary (?) operator, 40
test conditions. See decision statements; loop statements
testing programs, 9
text box controls (forms), 310-313
text I/O, 381-387
Text namespace (System::Drawing), 280, 358
Text node type, 409
Text property
   ComboBox class, 308
   Label class, 301
   ListBox class, 306
   TextBoxBase class, 311
TextAlign property
   Button class, 303
   Label class, 302
   TextBox class, 312
TextBox class (System::Windows::Forms), 281, 289, 331
TextBoxBase class, 310-313
TextLength property (TextBoxBase), 311
TextReader, TextWriter classes (System::Diagnostics), 279
TextReader, TextWriter classes (System::IO), 380, 385-387
TextureBrush class (System::Drawing), 359
ThreeState property (CheckBox), 304
throw keyword, 185
throwing exceptions, 186-189, 195-196. See also exceptions
tilde (~)
   ~ (complement) operator, 40
   destructor function, names for, 100
Timer class (System::Windows::Forms), 331
tolerance for equality, 174
ToolBar class (System::Windows::Forms), 281, 289, 331, 348-352
toolbar controls (forms), 348-352
ToolBarButton class (System::Windows::Forms), 349
TopIndex property (ListBox), 306
TopItem property (ListView), 341
TopLevel, TopMost properties (Form), 293
TopNode property (TreeView), 333
ToString method
   DirectoryInfo class, 389
   FileInfo class, 390
   System::Type class, 543
TrackBar class (System::Windows::Forms), 331
traditional C++ exceptions, 186
transforming XML, 435-449
TreeNode, TreeView classes (System::Windows::Forms), 331-339, 347
TrimToSize method (ArrayList), 227
Truncate member (FileMode), 384
try and catch construct, 189-191
   catch(...) block, 197
   __finally block, 196-197
   nesting and rethrowing exceptions, 194-196
__try_cast keyword, 201
two-way decision testing, 69-70
type casting. See casting
Type class (System), 542-544
TypeAttributes enumeration, 544
typedefs, 35
TypeLoadException class, 187
types, 3
   boxing and unboxing, 513-515
   casting. See casting

U
UDDI (Universal Description, Discovery, and Integration), 480
UI namespaces (System::Web), 283
UInt16, UInt32, UInt64, UIntPtr types, 276
UML (Unified Modeling Language), 130
unboxing types, 513-515
unconditional jumps, 83-84
Underline property (Font), 370
UnderlyingSystemType property (System::Type), 543
Undo method (TextBoxBase), 311
UnicodeClass member (TypeAttributes), 544
Unified Modeling Language (UML), 130
Unit property (Font), 370
Universal Description, Discovery, and Integration (UDDI), 480
unmanaged arrays. See arrays
unmanaged classes, 90. See also classes
unmanaged code, 268, 507-526
   boxing and unboxing, 513-515
   managed code vs., 507-511
   operator overloading, 165, 170
   pinning, 512
   PInvoke to call Win32 API functions, 517-525
update statements in loops, 78
UpdateCommand class, 461
UseMnemonic property (Label), 302
User property (WebService), 476
#using directive, 94, 274
using statements, 5, 273

V
validating XML when parsing, 414-418
ValidationType property (XmlValidatingReader), 415
__value keyword, 23, 154, 200
Value property
   XmlDocument class, 425
   XmlNode class, 427
   XmlTextReader, 412
   XmlTextReader class, 407-409
   XPathNavigator class, 437
value types, 22, 151-153, 166
   boxing as reference types, 176, 513-515
   operator overloading, 167-171
   properties of, 153
values, default
   function parameters, 48
   variables, 30
variables, 27-28. See also arrays; collections; constants; enumerations; pointers; properties; references
   adding to classes, 30, 35-36
   class-wide data members, 103-104
   converting between data types, 31
   declaring and naming, 29-30, 53
   enumerations, 34
   loop variables, 80
   scope, 59
   strong typing, 3
   visibility of, 21
verifying well-formed XML, 413
version information, adding, 528
versioning, 270
VerticalResolution property (Bitmap), 372
View property (ListView), 341
virtual data members. See properties
virtual keyword, 140-144
visibility of variables and methods, 21
VisibleCount property (TreeView), 333
void keyword, 46, 48

W
W3C DOM (Document Object Model), 424
warnings, 13. See also errors
wchar_t data type, 28
Web applications, 493-497. See also Web services
Web browsers, applications and services from, 497
Web namespaces, 283
Web Service Description Language (WSDL), 474
Web services, 283, 471-486. See also Web applications
   accessing from browsers or code, 479-485, 502
   ATL Server library for, 497-504
   creating simple services, 476-479
   debugging, 484
   namespaces for, 475-476
   using without Visual Studio .NET, 484
WebControls namespace (System::Web::UI), 283
WebMethodAttribute class (System::Web::Services), 476
WebService, WebServiceAttribute classes (System::Web::Services), 476
well-formed XML, verifying, 413
while loops, 77-79
white space within code, 6
Whitespace node type, 409, 413
Width property (Bitmap), 372
Win32 API functions, calling, 517-525
Windows API, 269
Windows DLLs, 533
Windows Forms, 280, 285-318
   ActiveX controls, 557-560
   color in, 368-369
   controls, using, 300-313
      ListView control, 340-343
      status bars, 353-355
      tab ordering, 327
      toolbars, 348-352
   designers, 286, 294
   directory browsing, 335-339, 343-347
   disconnected applications, 461-462
   file I/O and directories. See files; System::IO namespace; text I/O
   fonts in, 369-372
   forms, creating and using, 289-300
   graphics in forms. See graphics in forms
   menus, using, 314-318
   MFC library vs., 287
   printing functionality, 373-376
   System::Windows::Forms namespace, 288-289
WindowState property (Form), 293
WordWrap property (TextBoxBase), 311
wrapper classes. See CCWs; RCWs
Write member (FileAccess, FileShare), 384
Write methods
   BinaryWriter class, 397
   TextWriter class, 381
   XmlTextWriter class, 419
Write7BitEncodedInt method (BinaryWriter), 397
WriteContent method (XmlDocument), 426
WriteContentTo method (XmlNode), 428
WriteLine method (TextWriter), 381
write-only properties, 237-238
WriteState property (XmlTextWriter), 419
WriteTo method (XmlDocument), 426
WriteTo method (XmlNode), 428
writing XML, 419-424
WSDL (Web Service Description Language), 474

X
XML, 405, 419-424
   attributes, handling, 414
   namespaces, 282, 406
   nodes (XmlNode class), 427-434
   parsing, 407-418
   transforming into other formats, 435-449
   XmlDocument class, 424-434
XmlAttribute class, 427
XmlComment class, 427
XmlDeclaration node type, 409
XmlDocument class (System::Xml), 407, 424-434
XmlElement class, 427-434
XmlLang property
   XmlTextReader class, 408
   XmlTextWriter class, 419
   XPathNavigator class, 437
XmlNode base class (System::XML), 427-434
XmlNodeType enumeration, 409
XmlSpace property (XmlTextWriter), 419
XmlText class, 427
XmlTextReader class (System::XML), 407-414
XmlTextWriter class (System::XML), 407, 419-424
XmlValidatingReader class (System::XML), 407, 414-418
XPath (XML Path Language), 282, 437-444
XSL (Extensible Stylesheet Language), 435
   style sheet basics, 445
   transforming XML documents with, 444-449
   Xsl namespace (System::XML), 282
   XSLT (XSL Transformations), 436
   XslTransform class (System::Xml::Xsl), 444-449

Y
Yes value (DialogResult), 323



Last Updated: March 12, 2003
Top of Page