Acknowledgements |
|
xix | |
Preface |
|
xxi | |
Part I The Visual C++ Developer Studio |
|
1 | (52) |
|
Rapid Application Development |
|
|
3 | (14) |
|
|
4 | (4) |
|
|
8 | (1) |
|
|
9 | (2) |
|
|
11 | (3) |
|
|
14 | (3) |
|
|
17 | (14) |
|
|
17 | (3) |
|
|
18 | (2) |
|
|
20 | (1) |
|
|
20 | (1) |
|
|
21 | (2) |
|
|
21 | (1) |
|
|
22 | (1) |
|
|
22 | (1) |
|
|
22 | (1) |
|
|
23 | (1) |
|
|
23 | (6) |
|
Constructor and Destructor |
|
|
25 | (1) |
|
|
26 | (1) |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
29 | (1) |
|
|
29 | (2) |
|
Working with Visual Developer Studio |
|
|
31 | (22) |
|
|
32 | (17) |
|
|
32 | (2) |
|
|
34 | (2) |
|
|
36 | (1) |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
37 | (1) |
|
|
38 | (2) |
|
|
40 | (2) |
|
|
42 | (3) |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
47 | (2) |
|
|
49 | (4) |
Part II MFC GUI |
|
53 | (84) |
|
|
55 | (8) |
|
|
56 | (2) |
|
Adding Functions with ClassWizard |
|
|
58 | (2) |
|
|
60 | (2) |
|
|
62 | (1) |
|
The Static Box, Edit Box, and Button |
|
|
63 | (16) |
|
|
63 | (2) |
|
|
65 | (11) |
|
|
66 | (1) |
|
|
67 | (3) |
|
|
70 | (1) |
|
|
71 | (2) |
|
Edit Box with Numeric Data |
|
|
73 | (2) |
|
|
75 | (1) |
|
|
75 | (1) |
|
|
76 | (3) |
|
Implementing a Command Button |
|
|
76 | (3) |
|
The Check Box, Radio Button, and Group Control |
|
|
79 | (10) |
|
|
79 | (3) |
|
|
80 | (2) |
|
|
82 | (1) |
|
|
82 | (5) |
|
|
85 | (2) |
|
|
87 | (2) |
|
The Combo Box and the List Box |
|
|
89 | (8) |
|
|
89 | (5) |
|
|
89 | (2) |
|
Loading Data in a Combo Box |
|
|
91 | (2) |
|
|
93 | (1) |
|
|
94 | (3) |
|
|
95 | (2) |
|
The Slider Bar, Spin Control, and Progress Bar |
|
|
97 | (8) |
|
The Slider or Trackbar Control |
|
|
97 | (3) |
|
|
99 | (1) |
|
|
100 | (2) |
|
Reading the Spin Control Position |
|
|
102 | (1) |
|
|
102 | (3) |
|
The Picture and Animation Controls |
|
|
105 | (6) |
|
|
105 | (3) |
|
|
108 | (3) |
|
|
110 | (1) |
|
Creating Control Objects from Code |
|
|
111 | (8) |
|
|
111 | (3) |
|
Creating a Static Control |
|
|
114 | (1) |
|
Creating a Button Control |
|
|
115 | (1) |
|
Creating a Check Box Control |
|
|
115 | (1) |
|
|
116 | (1) |
|
|
116 | (1) |
|
|
116 | (1) |
|
|
117 | (1) |
|
|
117 | (1) |
|
|
117 | (2) |
|
Dialog and Application Development |
|
|
119 | (18) |
|
Anatomy of a Dialog Application |
|
|
119 | (4) |
|
|
123 | (9) |
|
Deactivating Menu Commands |
|
|
126 | (4) |
|
Controlling the Modeless Dialog Programmatically |
|
|
130 | (2) |
|
|
132 | (5) |
|
|
132 | (1) |
|
|
133 | (1) |
|
|
134 | (3) |
Part III VC++ Projects |
|
137 | (28) |
|
|
139 | (10) |
|
The MFC Class Library References |
|
|
139 | (3) |
|
|
142 | (4) |
|
Taking Advantage of the IDE |
|
|
142 | (4) |
|
|
146 | (3) |
|
Inserting a Project in a Workspace |
|
|
146 | (2) |
|
|
148 | (1) |
|
|
149 | (8) |
|
|
149 | (1) |
|
|
150 | (2) |
|
|
152 | (2) |
|
|
153 | (1) |
|
|
154 | (3) |
|
|
157 | (8) |
|
Removing Classes and Objects |
|
|
157 | (3) |
|
Removing an Object Variable |
|
|
158 | (1) |
|
Removing a Member Variable |
|
|
158 | (1) |
|
Removing a Member Function |
|
|
159 | (1) |
|
|
159 | (1) |
|
|
160 | (1) |
|
|
161 | (2) |
|
|
161 | (1) |
|
|
161 | (1) |
|
Borrowing from an Executable |
|
|
161 | (1) |
|
|
161 | (1) |
|
|
162 | (1) |
|
|
163 | (2) |
Part IV The Document/View Paradigm |
|
165 | (50) |
|
|
167 | (8) |
|
|
170 | (1) |
|
|
170 | (1) |
|
|
171 | (1) |
|
|
172 | (3) |
|
The Document-to-View Relationship |
|
|
172 | (1) |
|
The Mainframe-to-View Relationship |
|
|
172 | (1) |
|
The View-to-Mainframe Relationship |
|
|
173 | (1) |
|
The Mainframe-to-Document Relationship |
|
|
173 | (1) |
|
The View-to-Document Relationship |
|
|
173 | (1) |
|
The Relationship to the Application |
|
|
173 | (2) |
|
The SDI Application Model |
|
|
175 | (20) |
|
|
175 | (4) |
|
|
175 | (2) |
|
|
177 | (2) |
|
|
179 | (1) |
|
|
180 | (2) |
|
|
180 | (1) |
|
|
180 | (1) |
|
|
181 | (1) |
|
|
181 | (1) |
|
|
181 | (1) |
|
|
181 | (1) |
|
|
181 | (1) |
|
|
181 | (1) |
|
|
182 | (1) |
|
|
182 | (1) |
|
|
183 | (6) |
|
|
183 | (1) |
|
|
184 | (2) |
|
|
186 | (3) |
|
|
189 | (1) |
|
Invalidate() and UpdateWindow() |
|
|
189 | (6) |
|
Printing and Print Preview |
|
|
195 | (6) |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
199 | (1) |
|
|
199 | (1) |
|
|
200 | (1) |
|
|
201 | (4) |
|
|
202 | (1) |
|
|
203 | (1) |
|
|
203 | (1) |
|
|
203 | (1) |
|
|
204 | (1) |
|
|
204 | (1) |
|
|
204 | (1) |
|
|
204 | (1) |
|
|
204 | (1) |
|
The MDI Application, Split Windows, and Multiple Views |
|
|
205 | (10) |
|
The MDI Application Model |
|
|
205 | (3) |
|
The Main Frame and the Child Frame |
|
|
207 | (1) |
|
Working with Split Windows |
|
|
208 | (3) |
|
|
210 | (1) |
|
Working with Multiple Views |
|
|
211 | (4) |
Part V Working with MFC Data Classes |
|
215 | (36) |
|
|
217 | (6) |
|
|
218 | (1) |
|
|
218 | (1) |
|
|
218 | (1) |
|
|
219 | (1) |
|
|
219 | (1) |
|
|
219 | (1) |
|
MakeLower() and MakeUpper() |
|
|
219 | (1) |
|
TrimLeft() and TrimRight() |
|
|
220 | (1) |
|
|
220 | (3) |
|
|
223 | (8) |
|
|
223 | (6) |
|
|
223 | (1) |
|
|
224 | (1) |
|
|
224 | (1) |
|
|
224 | (1) |
|
The Month Calendar Control |
|
|
225 | (3) |
|
|
228 | (1) |
|
|
229 | (2) |
|
|
231 | (10) |
|
|
231 | (5) |
|
|
232 | (2) |
|
|
234 | (1) |
|
|
234 | (1) |
|
|
234 | (1) |
|
|
234 | (1) |
|
|
234 | (2) |
|
|
236 | (5) |
|
|
236 | (1) |
|
|
236 | (2) |
|
|
238 | (3) |
|
|
241 | (10) |
|
|
241 | (3) |
|
|
244 | (7) |
|
|
244 | (4) |
|
|
248 | (1) |
|
|
249 | (2) |
Part VI Database Processing |
|
251 | (68) |
|
|
251 | (4) |
|
Setting Up the ODBC Data Source |
|
|
252 | (3) |
|
An AppWizard ODBC Database Application |
|
|
255 | (12) |
|
|
258 | (1) |
|
|
259 | (2) |
|
|
261 | (6) |
|
|
261 | (1) |
|
|
261 | (2) |
|
|
263 | (1) |
|
|
264 | (1) |
|
|
264 | (3) |
|
An ODBC Data Table Processor |
|
|
267 | (12) |
|
|
269 | (2) |
|
Opening and Closing the Database |
|
|
271 | (2) |
|
|
273 | (1) |
|
|
274 | (2) |
|
|
276 | (3) |
|
An ODBC Database Application |
|
|
279 | (22) |
|
|
280 | (2) |
|
|
282 | (6) |
|
Determining Grid Row Count |
|
|
287 | (1) |
|
Setting Up Grid Column Headers |
|
|
287 | (1) |
|
Setting Grid Column Width |
|
|
287 | (1) |
|
|
288 | (1) |
|
|
288 | (4) |
|
|
292 | (9) |
|
|
292 | (2) |
|
|
294 | (7) |
|
The List View, Image List, and Tree View |
|
|
301 | (8) |
|
|
301 | (2) |
|
|
303 | (2) |
|
|
305 | (4) |
|
|
307 | (2) |
|
SQL, DAO, OLE DB, and ADO |
|
|
309 | (10) |
|
SQL Processing (CDatabase) |
|
|
309 | (2) |
|
Working with a Database Directly |
|
|
310 | (1) |
|
|
311 | (2) |
|
|
312 | (1) |
|
|
312 | (1) |
|
|
312 | (1) |
|
|
312 | (1) |
|
|
313 | (6) |
|
|
313 | (1) |
|
|
313 | (2) |
|
|
315 | (4) |
Part VII Component Programming |
|
319 | (30) |
|
|
321 | (12) |
|
|
321 | (4) |
|
|
322 | (2) |
|
Writing an Export Function |
|
|
324 | (1) |
|
|
325 | (2) |
|
|
326 | (1) |
|
|
327 | (2) |
|
|
329 | (4) |
|
|
330 | (3) |
|
Building ActiveX Controls |
|
|
333 | (16) |
|
Creating An ActiveX Component |
|
|
333 | (16) |
|
Trying the ActiveX Control |
|
|
335 | (1) |
|
|
336 | (1) |
|
|
336 | (3) |
|
|
339 | (1) |
|
|
340 | (2) |
|
Adding a Stock Property Page |
|
|
342 | (1) |
|
Adding a Second Custom Property Page |
|
|
342 | (2) |
|
|
344 | (1) |
|
|
344 | (1) |
|
Using the ActiveX Control |
|
|
345 | (4) |
Part VIII Professional Software Development |
|
349 | (86) |
|
A Professional-Quality Application |
|
|
351 | (26) |
|
|
352 | (2) |
|
Drawing Different View Displays |
|
|
354 | (4) |
|
|
354 | (2) |
|
Subscription Routing Slip |
|
|
356 | (2) |
|
|
358 | (1) |
|
|
359 | (4) |
|
A Sizable Dialog Application |
|
|
361 | (2) |
|
|
363 | (5) |
|
Customizing the Status Bar |
|
|
368 | (2) |
|
|
370 | (2) |
|
|
372 | (5) |
|
|
374 | (3) |
|
|
377 | (8) |
|
|
377 | (1) |
|
|
377 | (2) |
|
|
379 | (1) |
|
|
379 | (6) |
|
|
380 | (1) |
|
|
381 | (1) |
|
|
382 | (1) |
|
|
382 | (1) |
|
CFindReplaceDialog and COleDialog |
|
|
383 | (2) |
|
|
385 | (18) |
|
Property Sheets and Wizards |
|
|
386 | (6) |
|
|
386 | (4) |
|
|
390 | (2) |
|
|
392 | (3) |
|
|
395 | (1) |
|
|
396 | (1) |
|
|
397 | (6) |
|
|
403 | (8) |
|
|
403 | (2) |
|
|
405 | (2) |
|
|
407 | (1) |
|
|
408 | (1) |
|
|
409 | (1) |
|
|
410 | (1) |
|
|
411 | (8) |
|
|
411 | (1) |
|
|
412 | (1) |
|
|
413 | (2) |
|
|
415 | (2) |
|
|
417 | (1) |
|
|
417 | (2) |
|
Program Installation and Distribution |
|
|
419 | (16) |
|
|
420 | (1) |
|
|
420 | (15) |
|
|
424 | (1) |
|
|
424 | (1) |
|
|
425 | (2) |
|
|
427 | (4) |
|
|
431 | (2) |
|
Building Distribution Files |
|
|
433 | (1) |
|
Creating Distribution Media |
|
|
433 | (1) |
|
Testing the Distribution Package |
|
|
434 | (1) |
Part IX Beyond VC++ 6.0 |
|
435 | (24) |
|
Current VC++ and MFC Applications |
|
|
437 | (4) |
|
VC++ and Client/Server Systems |
|
|
437 | (1) |
|
|
438 | (1) |
|
Device Drivers and Onboard Applications |
|
|
438 | (1) |
|
|
438 | (3) |
|
|
441 | (18) |
|
|
441 | (1) |
|
The .NET Microsoft Development Environment |
|
|
442 | (2) |
|
VC++ 7.0 and Managed VC++ |
|
|
444 | (4) |
|
|
448 | (7) |
|
|
449 | (1) |
|
|
450 | (1) |
|
|
451 | (1) |
|
|
452 | (3) |
|
|
455 | (1) |
|
|
456 | (3) |
Glossary |
|
459 | (4) |
Appendix: About the CD-ROM |
|
463 | (4) |
Index |
|
467 | |