[...]... Exercises xxii 11 22 11 24 11 27 11 38 11 38 11 39 11 40 11 41 114 3 11 47 11 50 11 56 11 56 11 56 11 57 11 58 11 60 11 62 11 63 11 65 11 66 11 66 25905ftoc.qxd:WroxPro 2/ 21/ 08 8:30 AM Page xxiii Contents Chapter 21: Updating Data Sources Update Operations CRecordset Update Operations Transactions A Simple Update Example 11 67 11 67 11 68 11 70 11 72 Customizing the Application 11 73 Managing the Update Process 11 75 Implementing... Implementing the Help > About Menu Item Handling a Button Click Responding to the Context Menu Summary Exercises 11 77 11 86 11 87 11 87 11 88 11 88 11 93 11 97 12 00 12 05 12 07 12 09 12 14 12 15 12 17 12 17 12 20 12 22 12 24 12 26 12 27 12 28 12 28 12 35 12 35 12 40 12 45 12 53 12 53 12 56 12 63 12 64 xxiii 25905ftoc.qxd:WroxPro 2/ 21/ 08 8:30 AM Page xxiv Contents Chapter 23: Accessing Data Sources in a Windows Forms Application Working... DLL Summary Exercises Chapter 20: Connecting to Data Sources Database Basics A Little SQL 11 00 11 00 11 08 11 09 11 09 11 12 11 12 11 13 11 13 11 16 Retrieving Data Using SQL Joining Tables Using SQL Sorting Records 11 16 11 18 11 20 Database Support in MFC 11 20 MFC Classes Supporting ODBC 11 21 Creating a Database Application 11 22 Registering an ODBC Database Generating an MFC ODBC Program Understanding the Program... Scrolling with Scaling Working with Status Bars Adding a Status Bar to a Frame Using a List Box 996 997 998 998 999 10 00 10 01 10 01 1002 10 03 10 04 10 07 10 08 10 08 10 09 10 10 10 12 10 13 10 14 10 18 Removing the Scale Dialog Creating a List Box Control 10 18 10 19 Using an Edit Box Control 10 21 Creating an Edit Box Resource Creating the Dialog Class Adding the Text Menu Item Defining a Text Element Implementing... Multiple Tables Summary Exercises 12 65 12 66 12 67 12 67 12 69 12 75 12 76 12 77 12 84 12 90 12 90 12 96 12 99 13 02 13 04 13 05 Appendix A: C++ Keywords 13 07 Appendix B: ASCII Codes 13 09 Appendix C: Windows Message Types 13 17 Index 13 19 xxiv 25905flast.qxd:WroxPro 2/ 21/ 08 8:28 AM Page xxv Introduction Welcome to Beginning Visual C++ 2008 With this book you can become an effective C++ programmer The latest development... Printing a Document The Printing Process 10 47 10 47 10 48 10 48 10 49 10 52 10 53 10 54 10 55 10 55 10 56 10 58 10 61 1062 10 64 10 65 Implementing Multipage Printing 10 68 Getting the Overall Document Size Storing Print Data Preparing to Print Cleaning Up After Printing Preparing the Device Context Printing the Document Getting a Printout of the Document 10 68 10 69 10 70 10 72 10 72 10 73 10 77 Serialization and Printing in... the Same Type Arrays Declaring Arrays Initializing Arrays Character Arrays and String Handling Multidimensional Arrays 13 5 13 8 14 6 14 8 14 9 15 3 15 6 15 9 15 9 16 1 16 2 16 2 16 3 16 6 16 8 17 1 Indirect Data Access 17 4 What Is a Pointer? Declaring Pointers 17 4 17 5 ix 25905ftoc.qxd:WroxPro 2/ 21/ 08 8:29 AM Page x Contents Using Pointers Initializing Pointers The sizeof Operator Constant Pointers and Pointers to...25905ftoc.qxd:WroxPro 2/ 21/ 08 8:29 AM Page ix Contents C++/ CLI Programming C++/ CLI Specific: Fundamental Data Types C++/ CLI Output to the Command Line C++/ CLI Specific — Formatting the Output C++/ CLI Input from the Keyboard Using safe_cast C++/ CLI Enumerations Summary Exercises Chapter 3: Decisions and Loops Comparing Values 97 98 10 2 10 3 10 6 10 7 10 7 11 2 11 4 11 7 11 7 The if Statement Nested if... Reference? Declaring and Initializing References Native C++ Library Functions for Strings Finding the Length of a Null-Terminated String Joining Null-Terminated Strings Copying Null-Terminated Strings Comparing Null-Terminated Strings Searching Null-Terminated Strings 17 6 17 8 18 3 18 5 18 7 19 4 19 4 19 5 19 5 19 8 19 9 19 9 19 9 200 200 2 01 203 204 204 C++/ CLI Programming 206 Tracking Handles CLR Arrays Strings... 5 61 5 61 565 570 5 71 583 585 596 597 6 01 6 01 602 603 604 605 605 606 606 607 608 611 615 616 618 623 624 626 630 640 6 51 652 664 665 665 669 670 672 674 674 xv 25905ftoc.qxd:WroxPro 2/ 21/ 08 8:29 AM Page xvi Contents replace() find() transform() 674 675 675 The STL for C++/ CLI Programs 676 STL/CLR Containers Using Sequence Containers Using Associative Containers 677 677 685 Summary Exercises Chapter 11 : . Keyboard 10 6 Using safe_cast 10 7 C++/ CLI Enumerations 10 7 Summary 11 2 Exercises 11 4 Chapter 3: Decisions and Loops 11 7 Comparing Values 11 7 The if Statement 11 9 Nested if Statements 12 0 Nested. for Loop 13 8 The while Loop 14 6 The do-while Loop 14 8 Nested Loops 14 9 C++/ CLI Programming 15 3 The for each Loop 15 6 Summary 15 9 Exercises 15 9 Chapter 4: Arrays, Strings, and Pointers 16 1 Handling. class="bi x0 y0 w0 h0" alt="" Ivor Horton’s Beginning Visual C++ ® 2008 Ivor Horton 25905ffirs.qxd:WroxPro 2/ 21/ 08 8:27 AM Page iii Ivor Horton’s Beginning Visual C++ ® 2008 Introduction . . . .