Developing Professional Applications for Windows 98 and NT Using MFC

Overview

The #1 MFC guide for every Windows programmer!

Practical techniques for industrial-strength code.

Incorporate today's latest, hottest user interface features.

Fully updated for Windows 98 and NT4 - with regular Web updates!

Code and searchable book on CD-ROM!

The #1 MFC guide, now updated for Windows 98, ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (12) from $5.55   
  • New (8) from $44.22   
  • Used (4) from $5.55   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$44.22
Seller since 2009

Feedback rating:

(2338)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
5/27/1999 Paperback 3rd New 0130851213 Ships Within 24 Hours. Tracking Number available for all USA orders. Excellent Customer Service. Upto 15 Days 100% Money Back Gurantee. ... Try Our Fast! ! ! ! Shipping With Tracking Number. Read more Show Less

Ships from: Bensalem, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$60.00
Seller since 2014

Feedback rating:

(136)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$76.46
Seller since 2010

Feedback rating:

(674)

Condition: New
PAPERBACK New 0130851213! ! ! ! BEST PRICES WITH A SERVICE YOU CAN RELY! ! !

Ships from: Philadelphia, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$76.46
Seller since 2010

Feedback rating:

(901)

Condition: New
PAPERBACK New 0130851213 Friendly Return Policy. A+++ Customer Service!

Ships from: Philadelphia, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$76.46
Seller since 2013

Feedback rating:

(389)

Condition: New
PAPERBACK New 0130851213! ! KNOWLEDGE IS POWER! ! ENJOY OUR BEST PRICES! ! ! Ships Fast. All standard orders delivered within 5 to 12 business days.

Ships from: Southampton, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$76.46
Seller since 2011

Feedback rating:

(710)

Condition: New
PAPERBACK New 0130851213 SERVING OUR CUSTOMERS WITH BEST PRICES. FROM A COMPANY YOU TRUST, HUGE SELECTION. RELIABLE CUSTOMER SERVICE! ! HASSLE FREE RETURN POLICY, SATISFACTION ... GURANTEED**** Read more Show Less

Ships from: Philadelphia, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$76.46
Seller since 2014

Feedback rating:

(265)

Condition: New
PAPERBACK New 0130851213 XCITING PRICES JUST FOR YOU. Ships within 24 hours. Best customer service. 100% money back return policy.

Ships from: Bensalem, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$114.58
Seller since 2014

Feedback rating:

(257)

Condition: New
Brand New Item.

Ships from: Chatham, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview

The #1 MFC guide for every Windows programmer!

Practical techniques for industrial-strength code.

Incorporate today's latest, hottest user interface features.

Fully updated for Windows 98 and NT4 - with regular Web updates!

Code and searchable book on CD-ROM!

The #1 MFC guide, now updated for Windows 98, NT4, and the latest Visual C++!

Developing Professional Applications for Windows 98 and NT Using MFC is a huge, single-volume storehouse of practical information for Visual C++ and MFC developers at every skill level. Year after year, it's a best-seller, because no other book offers as much practical guidance and industrial-strength code. Now there's a new edition, fully updated to reflect Windows 98 and NT 4. Better yet, this book will stay up-to-date, thanks to a companion website that posts new information and sample code whenever Microsoft updates Visual C++!

You'll find precise, comprehensive coverage of everything MFC programmers should know, from the basics to sophisticated database, OLE, and thread support. Discover how to make the most of Microsoft's AppWizard and Class Wizard and learn how to incorporate sophisticated user interface features, such as expanding dialogs and subclassed graphical lists. Build multi-document and multi-view MDI applications; master DDX and DDV; create splash screens; and work with resource editors, canned dialogs, list and edit controls, debugging, utility classes, and much more.

The accompanying CD-ROM includes a complete, searchable copy of the book in Adobe Acrobat format, plus all the book's source code—then, look for updates on the Web whenever Microsoft updates MFC!

Read More Show Less

Editorial Reviews

Booknews
A guide to programming with Microsoft Foundation Classes and C++ in the Windows environment for readers with some previous experience in programming. Begins with the basics, and progresses to sophisticated databases, OLE, thread support, expanding dialogs, subclassed graphical lists, multi-document and multi-view MDI applications, DDX and DDV, splash screens, and other fancy features. The CD-ROM contains the entire book in Abode Acrobat plus all the source code. The latest edition reflects Windows 98 and NT 4, and will be updated on the accompanying web site. There is no bibliography. Annotation c. Book News, Inc., Portland, OR (booknews.com)
Read More Show Less

Product Details

  • ISBN-13: 9780130851215
  • Publisher: Prentice Hall Professional Technical Reference
  • Publication date: 5/27/1999
  • Series: Prentice Hall Microsoft Technology Series
  • Edition number: 3
  • Pages: 856
  • Product dimensions: 7.03 (w) x 9.21 (h) x 1.60 (d)

Read an Excerpt

Preface:

Getting Your Bearings

You are probably opening this book because you are new to Windows Programming or because you are new to MFC (Microsoft Foundation Classes) or the Visual C++ programming environment. For example, you might be an experienced UNIX or Macintosh programmer. Or perhaps you have a lot of talent with C programming and command-driven user interfaces on PCs and want to move over to Windows. You may be experienced with Windows programming in C, but have never before used MFC and C++ to develop Windows applications. Regardless of your origin, you will find that as you try to make your transition you are hampered by two problems. The purpose of this book is to quickly solve those problems so that you can begin creating your own professional applications with Visual C++ as quickly as possible.

The first problem is mental: you have to get past the wall that surrounds Visual C++. That wall arises because of the obvious complexity of the Windows and C++ programming environments. When you load Visual C++ from its CD, you notice that there are tens of thousands of pages of documentation, hundreds of sample programs, and untold megabytes of help files. No one has the time to sort through all of this material, but you know that hidden in those megabytes are hundreds of important concepts that you need to master.

The second problem is more pedestrian: you have to pick a place to start. But where should you begin? How do you write a simple Windows application? How do you learn how to write an advanced one?

This book is designed to help you move into the Visual C++ environment rapidly and confidently. The purpose of thischapter is to help you get your bearings in this new environment. It will introduce you to Visual C++ and then give you a starting point and a direction so that you can become an accomplished Windows programmer very quickly using the most modern tools and techniques available.

What is Visual C++?

The Visual C++ environment is huge and can be extremely intimidating initially. Visual C++ combines a complete suite of powerful tools into a single application development environment, and the first time you face all of these tools it can be very difficult to discern what they all do or how to use them. When you look at the book reader application that comes with the Visual C++ CD-ROM, you face another hurdle: You find thousands and thousands of pages in many different books. The thought of wading through all of these manuals can be daunting.

So letÕs start at the beginning and look at Visual C++ in an organized way. First of all, what is it? Here is a brief summary:

  • Visual C++ is a C++ compiler
  • Visual C++ is a debugging environment
  • Visual C++ is an application framework generator
  • Visual C++ is a project manager
  • Visual C++ is an easy way to design and implement menus, dialogs, and other "resources"
  • Visual C++ is a programmer acceleratorÑseveral tools inside Visual C++ are designed to make you more efficient by making your life as a programmer easier or by reducing the code you must write

In other words, Visual C++ is a complete and extremely powerful application development environment. In order to take full advantage of this environment, you have to become comfortable with all the too to know how they can work together to accelerate your software development cycle.

In its most basic form, Visual C++ is simply a C++ compiler. You can use it to create simple text programs in C or C++. If you would like to try this out, go to Appendix B.1 and work through the example there. You will find that it is extremely easy to write, compile, and debug simple text programs using Visual C++.

Most people who purchase Visual C++ do not want to create text programs, however. They want to create advanced Windows applications that make effective use of the Windows 98 and Windows NT user interface. To do this, you must know C++, and you must understand the MFC hierarchy. MFC is designed make you as productive as possible by encapsulating common Windows code in classes that are already written, tested, and debugged. Once you invest the time to learn MFC, you are greatly rewarded in increased speed, flexibility and robustness.

Part 1 of this book gives you a thorough introduction to MFC. It shows you the basic principles used in every MFC program you write. Part 2 gives a complete overview of all the controls and features that MFC offers. Part 2 contains hundreds of examples that make it easy to understand the different MFC classes.

Once you feel comfortable with MFC, you are ready to begin creating professional Windows applications. Part 3 introduces the AppWizard, the ClassWizard, and the resource editing tools of Visual C++. The AppWizard is your starting point when creating any full-blown Windows application: It helps you by generating a complete file framework that organizes the entire application around a consistent core of MFC classes. The ClassWizard, in combination with the resource editing features that the Visual C++ environment provides, then makes it easy to add to and complete your application by helping you design, create, and install menus, dialog boxes, and other application resources. The ClassWizard also helps you add the code that lets your application respond to user input properly. Using these three toolsÑthe AppWizard, the ClassWizard, and the resource editorsÑtogether with the MFC class hierarchy, it is extremely easy to complete professional applications very quickly. Part 3 contains four different example applications to help demonstrate the process.

Part 4 continues by demonstrating advanced features. It shows you how to use a variety of techniques to create such things as expanding dialogs, property sheets, dialog bars, splash screens, self-drawn controls and bitmapped backgrounds. These techniques add significant utility to your applications when used appropriately. Finally, Part 5 concludes the book by discussing advanced MFC classes for database connectivity, OLE features, and so on.

Available Documentation

The Visual C++ CD-ROM contains over 100 megabytes of on-line documentation covering various aspects of Windows, MFC, and the tools available in Visual C++. It contains many more megabytes of sample code. The MFC class hierarchy contains hundreds of different classes holding thousands of member functions. The Win32 API contains thousands of functions as well. All of this material is documented in on-line help files. Obviously, there is no lack of documentation with this product.

This book, therefore, makes no attempt to replace the documentation. Its goal is to help you wind your way through the Visual C++ forest and find what you need. Using the base you gain from reading this book, you will be able to approach Visual C++ and begin using it in productive ways very quickly.

There are currently seven different types of documentation provided by Microsoft for Visual C++ and MFC:

  1. On-line Books Ð A series of manuals on the CD-ROM that act as the documentation for the system. The collection of books is available from the Contents section of the Help menu. Look at the titles of all the different books and articles available. You will find that there are many. The books cover Visual Studio, the tools within Visual Studio like the compiler, debugger, etc., the many function libraries available, etc
  2. Sample Code Ð The Visual C++ directory on your hard disk may contain a sample directory that contains source code demonstrating a wide variety of techniques. Some of the samples are written in C, while other samples use MFC and C++.
  3. Developer Network CD Ð MicrosoftÕs DeveloperÕs Network CD provides quite a bit of additional sample code, along with books and files containing a variety of valuable information. You receive this CD when you become a member of the Microsoft DeveloperÕs Network.
  4. MicrosoftÕs Web Site - the Microsoft Web site contains knowledge bases and articles that may be helpful.
  5. Internet News Groups - Numerous newsgroups and mailing lists on the Internet bring C++/MFC developers together to share tips and techniques. There are also other web sites available full of sample code and tips.

Using all of these different forms of documen find anything you need to know. The key is understanding where and how to look for what you need. This book will help accelerate that process tremendously.

Road Map

The tools in Visual C++ require a great deal of prior knowledge if you want to use them effectively. For example, when you open the Visual C++ package and load the CD, you may have the impression that you can use the AppWizard to generate any program you like. Unfortunately, the code that the AppWizard generates is virtually worthless unless you know a good bit about MFC already. That is why this book is structured the way it is. The progression presented in this book is exactly the progression you will need to follow if you do not already know MFC. However, different people come into Visual C++ with varying levels of experience and different goals. Here is a road map to guide you through the material so that you can find the best starting point for your particular situation:

  • If you do not know C++, you will need to learn it. Proceed to the accelerated introduction to C++ in Appendix A of this book.
  • If you want to simply try out Visual C++ and compile some simple programs, proceed to Appendix B. It will show you how the compiler works and how to compile and debug simple applications.
  • If you know C++ but have never done any Windows programming of any kind, proceed to Part 1. It will teach you the fundamentals of event-driven programming and then quickly introduce you to MFC programming.
  • If you have experience with Windows programming in C but have never done Windows programming using C++ and MFC, proceed to Part 1. It will quickly introduce you to the MFC class hi programming.
  • If you have used MFC before (for example, if you are familiar with MFC version 1.0) but are unfamiliar with the new application development tools like the AppWizard and the ClassWizard, skim Part 2 and then proceed to Part 3 for a complete introduction to the tools.
  • If you are familiar with Visual C++ and MFC but want to learn about a variety of techniques that can make your applications look more professional, turn to Part 4. It will show you how to create things like splash screens, expanding dialogs, property sheets, and self-drawn controls.
  • If you are a corporate programmer who needs to attach to a client/server database, pay particular attention to Chapter 33 in Part 5.

Common Questions

The goal of this section is to show you how to find answers to the most common questions about Visual C++ and MFC. You may wish to scan this list now and periodically in the future to quickly find answers to your questions.

Part 1

  1. What is MFC? Why does it exist? See Chapter 1
  2. How do I compile and run a simple MFC program? See Appendix B.3 and Chapter 1.
  3. How do I create a simple "Hello World!" program in MFC? What does the code actually mean? See Chapter 2.
  4. I have found the AppWizard, but when I run it I find it generates 15 files that make absolutely no sense to me. What do I do? See the discussion at the beginning of Part 3 of this book.
  5. How do I create a simple MFC control? See Chapter 3.
  6. How do I customize MFC controls and change their styles? See Chapter 3.
  7. How do I create a push button and respond to its events in MFC? See Chapter 4.
  8. What is a message ma scroll bar and respond to its events? See Chapter 4.
  9. How do I create an edit control and respond to its events? See Chapter 5 and Chapter 8.
  10. How do I create simple applications? See Chapter 5.
  11. How do I make a simple application appropriately handle tab keys, accelerators, etc.? See Chapter 5.

Part 2

  1. What is a resource? What is a resource file? What are the advantages of resources? See Chapter 6.
  2. How do I create and use icon, dialog, menu, string table, and accelerator resources? See Chapter 6.
  3. How do I create a message dialog? A File Open dialog? A Font dialog? A Color dialog? A Print dialog? A Find/Replace dialog? See Chapter 7.
  4. What is the difference between modal and modeless dialogs? See Chapter 7.
  5. How do I use an edit control in single and multi-line modes? See Chapter 8.
  6. How do I create a simple text editor? See Chapter 8.
  7. How do I create and use lists, drop down lists, and combo boxes in my applications? See Chapter 9 and Chapter 20.
  8. How do I make multi-column and tabbed lists? See Chapter 9.
  9. How do I load and display system and custom icons? See Chapters 6 and 10.
  10. How do I change the application cursor? See Chapter 10 and 11.5.3.
  11. How do I display a watch cursor? See Chapter 10.
  12. How do I perform background processing while the application is idle? See Chapter 10.
  13. What is a document template? See Chapter 10 and Chapter 16.
  14. How do I create an MRU file list? See Chapter 10.
  15. How do I use INI files with my applications? See Chapter 10.
  16. How do I draw lines, rectangles, circles, et to an application? See Chapter 11.
  17. How do I respond to mouse clicks in a drawing? See Chapter 11.
  18. How do I create rubber-banded lines, rectangles, etc. in a drawing?
  19. How do I create a drawing space larger than the current window? See Chapters 11 and 15.
  20. How do I create animated drawings? See Chapter 11.
  21. How do I work with text and binary files in MFC? See Chapter 12.
  22. How do I work with strings in MFC? See Chapter 12.
  23. How do I work with time values in MFC? See Chapter 12.
  24. Is there an easy way to create arrays, lists and hash tables in MFC? See Chapter 12.
  25. What debugging facilities are built into MFC? How do I make use of the MFC exception handling mechanisms? See Chapter 13.
  26. How do I use TRACE and ASSERT statements? See Chapter 13.
  27. How do I prevent and detect memory leaks in my applications? See Chapter 13.

Part 3

  1. Are there any simple applications in this book showing me how to use the AppWizard and ClassWizard? See the drawing example, the editor example, the form example and the address list example in Part 3 of this book.
  2. What is the AppWizard? What is the ClassWizard? How do I use them to speed up application development? See Chapter 14.
  3. How do I create a simple framework with the AppWizard? See Chapter 14.
  4. What do all of the files generated by the AppWizard do? See Chapter 14.
  5. What is the document/view paradigm? See Chapters 14, 15 and 18.
  6. What do the STDAFX files do? See Chapter 14.
  7. Can you give me a simple example of the AppWizard and ClassWizard in action? See Chapter 14.
  8. How paradigm? See Chapter 15.
  9. What is the difference between an SDI and an MDI application? See Chapter 15.
  10. How do I understand what is going on inside the AppWizard framework? See Section 15.3 and Chapter 21.
  11. How do I add new menus and menu options to an application? See Chapter 15.
  12. How do I add scrolling to a drawing application? How do I use splitter windows? See Chapter 15.
  13. How do I add a new dialog to an AppWizard framework? How do I use DDX and DDV? See Chapters 15 and 18.
  14. How do I add a dialog class with the ClassWizard? See Chapters 15 and 18.
  15. How do I add printing to an application? What do the MFC printing functions do? How do I handle multi-page printing? See Chapters 15 and 18.
  16. How do I create a text editor with the AppWizard? See Chapter 16.
  17. How do I handle multiple document types in a single MDI application? See Chapter 16.
  18. What is a document template? See Chapter 16.
  19. How do I use form views? How do I put controls on the face of an application? See Chapter 17.
  20. Can you give me an example that combines all of these different concepts in a single application? See Chapter 18.
  21. How do I create a resizable tabbed list in a form view? See Chapter 18.
  22. How do I enable and disable menu options? See Chapters 18 and 6.
  23. How do I customize the tool bar and status bar? See Chapter 18.
  24. How do I work with the clipboard in an application? See Chapter 18.
  25. How do I print text information from an application? See Chapter 18.
  26. How do I add context sensitive help to my applications? See Chapter 19.
  27. What is the help compiler and how do I use it? See C applications? See Chapter 20.
  28. How do I create Property sheets (tabbed dialogs) in my applications? See Chapter 20.

Part 4

  1. How do DDX and DDV really work behind the scenes? See Chapter 22.
  2. How do I integrate all of the different types of controls and use DDX to access them? See Chapter 22.
  3. Is there a way to create new DDX functions for different data types? See Chapter 22.
  4. How does MFC really work? What is happening inside of MFC? How does a C++ program using MFC compare to a C program? See Chapter 23.
  5. How does MFC handle window handles? See Chapter 23.
  6. Where is the window procedure in an MFC program? See Chapter 23.
  7. How does subclassing work with Windows controls? See Chapter 23.
  8. How can I take an existing control, like the CEdit control, and enhance its behavior without completely rewriting it? How do I integrate a new control like this into a dialog? See Chapter 24.
  9. How do I create list boxes and combo boxes that contain icons, bitmaps or other graphical elements? See Chapter 26.
  10. How do I handle owner-drawn controls in MFC? See Chapter 26.
  11. How do I enumerate fonts and other resources under Windows? See Chapter 26.
  12. How can I add a splash screen to my applications? See Chapter 27.
  13. How do I add expanding dialogs to my applications? See Chapter 28.
  14. How do I stretch a bitmap over an area? See Chapter 29.
  15. How can I draw onto a CStatic control? See Chapter 29.
  16. How do I add a bitmap or a drawing to the background of a dialog or a window? See Chapter 29.
  17. How do I create my own floating pale Manager? See Chapter 32.
  18. How do I make an application float so that it is "always on top." See Chapter 32.
  19. How do I start an application in a minimized or maximized state? See Chapter 32.
  20. How do I create a modelss dialog box? See Chapter 32.
  21. How do I create a mini-frame window? See Chapter 32.
  22. How do I create a popup menu activated by the right mouse button? See Chapter 32.
  23. How do I customize the system menu? See Chapter 32.

Part 5

  1. How to I access SQL databases from an MFC program? Chapter 33.
  2. What is a relational database? What is SQL? See Chapter 33.
  3. What is ODBC? How do I create ODBC data sources? See Chapter 33.
  4. What is the CRecordset class? How do I access databases with it? See Chapter 33.
  5. How do I retrieve records from a database? How do I add and delete records? See Chapter 33.
  6. What is OLE? How can I use it in my applications? See Chapter 34.
  7. What features does OLE support? See Chapter 34.
  8. What is the registry? What is a class ID? See Chapter 34.
  9. How do I create OLE servers and containers with MFC? See Chapter 34.
  10. How do I create an OLE automation server? How do I access an automation server from a Visual Basic or Visual C++? See Chapter 34.
  11. What is an OCX? How do I create an OLE control? See Chapter 34.
  12. What is a thread? How can I use threads to improve applications? See Chapter 35.
  13. What is the difference between worker and user-interface threads? See Chapter 35.
  14. How do thread priorities work? What are they? See Chapter 35.
  15. What is C++? How do I move from C to C++? Se browser? See Appendix B.
  16. What is OpenGL and how do I use it to create realistic graphical images? See Appendix D.
Read More Show Less

Table of Contents

Preface:

Getting Your Bearings

You are probably opening this book because you are new to Windows Programming or because you are new to MFC (Microsoft Foundation Classes) or the Visual C++ programming environment. For example, you might be an experienced UNIX or Macintosh programmer. Or perhaps you have a lot of talent with C programming and command-driven user interfaces on PCs and want to move over to Windows. You may be experienced with Windows programming in C, but have never before used MFC and C++ to develop Windows applications. Regardless of your origin, you will find that as you try to make your transition you are hampered by two problems. The purpose of this book is to quickly solve those problems so that you can begin creating your own professional applications with Visual C++ as quickly as possible.

The first problem is mental: you have to get past the wall that surrounds Visual C++. That wall arises because of the obvious complexity of the Windows and C++ programming environments. When you load Visual C++ from its CD, you notice that there are tens of thousands of pages of documentation, hundreds of sample programs, and untold megabytes of help files. No one has the time to sort through all of this material, but you know that hidden in those megabytes are hundreds of important concepts that you need to master.

The second problem is more pedestrian: you have to pick a place to start. But where should you begin? How do you write a simple Windows application? How do you learn how to write an advanced one?

This book is designed to help you move into the Visual C++ environment rapidly and confidently. The purpose ofthischapter is to help you get your bearings in this new environment. It will introduce you to Visual C++ and then give you a starting point and a direction so that you can become an accomplished Windows programmer very quickly using the most modern tools and techniques available.

What is Visual C++?

The Visual C++ environment is huge and can be extremely intimidating initially. Visual C++ combines a complete suite of powerful tools into a single application development environment, and the first time you face all of these tools it can be very difficult to discern what they all do or how to use them. When you look at the book reader application that comes with the Visual C++ CD-ROM, you face another hurdle: You find thousands and thousands of pages in many different books. The thought of wading through all of these manuals can be daunting.

So letÕs start at the beginning and look at Visual C++ in an organized way. First of all, what is it? Here is a brief summary:

  • Visual C++ is a C++ compiler
  • Visual C++ is a debugging environment
  • Visual C++ is an application framework generator
  • Visual C++ is a project manager
  • Visual C++ is an easy way to design and implement menus, dialogs, and other "resources"
  • Visual C++ is a programmer acceleratorÑseveral tools inside Visual C++ are designed to make you more efficient by making your life as a programmer easier or by reducing the code you must write

In other words, Visual C++ is a complete and extremely powerful application development environment. In order to take full advantage of this environment, you have to become comfortable with all the too to know how they can work together to accelerate your software development cycle.

In its most basic form, Visual C++ is simply a C++ compiler. You can use it to create simple text programs in C or C++. If you would like to try this out, go to Appendix B.1 and work through the example there. You will find that it is extremely easy to write, compile, and debug simple text programs using Visual C++.

Most people who purchase Visual C++ do not want to create text programs, however. They want to create advanced Windows applications that make effective use of the Windows 98 and Windows NT user interface. To do this, you must know C++, and you must understand the MFC hierarchy. MFC is designed make you as productive as possible by encapsulating common Windows code in classes that are already written, tested, and debugged. Once you invest the time to learn MFC, you are greatly rewarded in increased speed, flexibility and robustness.

Part 1 of this book gives you a thorough introduction to MFC. It shows you the basic principles used in every MFC program you write. Part 2 gives a complete overview of all the controls and features that MFC offers. Part 2 contains hundreds of examples that make it easy to understand the different MFC classes.

Once you feel comfortable with MFC, you are ready to begin creating professional Windows applications. Part 3 introduces the AppWizard, the ClassWizard, and the resource editing tools of Visual C++. The AppWizard is your starting point when creating any full-blown Windows application: It helps you by generating a complete file framework that organizes the entire application around a consistent core of MFC classes. The ClassWizard, in combination with the resource editing features that the Visual C++ environment provides, then makes it easy to add to and complete your application by helping you design, create, and install menus, dialog boxes, and other application resources. The ClassWizard also helps you add the code that lets your application respond to user input properly. Using these three toolsÑthe AppWizard, the ClassWizard, and the resource editorsÑtogether with the MFC class hierarchy, it is extremely easy to complete professional applications very quickly. Part 3 contains four different example applications to help demonstrate the process.

Part 4 continues by demonstrating advanced features. It shows you how to use a variety of techniques to create such things as expanding dialogs, property sheets, dialog bars, splash screens, self-drawn controls and bitmapped backgrounds. These techniques add significant utility to your applications when used appropriately. Finally, Part 5 concludes the book by discussing advanced MFC classes for database connectivity, OLE features, and so on.

Available Documentation

The Visual C++ CD-ROM contains over 100 megabytes of on-line documentation covering various aspects of Windows, MFC, and the tools available in Visual C++. It contains many more megabytes of sample code. The MFC class hierarchy contains hundreds of different classes holding thousands of member functions. The Win32 API contains thousands of functions as well. All of this material is documented in on-line help files. Obviously, there is no lack of documentation with this product.

This book, therefore, makes no attempt to replace the documentation. Its goal is to help you wind your way through the Visual C++ forest and find what you need. Using the base you gain from reading this book, you will be able to approach Visual C++ and begin using it in productive ways very quickly.

There are currently seven different types of documentation provided by Microsoft for Visual C++ and MFC:

  1. On-line Books Ð A series of manuals on the CD-ROM that act as the documentation for the system. The collection of books is available from the Contents section of the Help menu. Look at the titles of all the different books and articles available. You will find that there are many. The books cover Visual Studio, the tools within Visual Studio like the compiler, debugger, etc., the many function libraries available, etc
  2. Sample Code Ð The Visual C++ directory on your hard disk may contain a sample directory that contains source code demonstrating a wide variety of techniques. Some of the samples are written in C, while other samples use MFC and C++.
  3. Developer Network CD Ð MicrosoftÕs DeveloperÕs Network CD provides quite a bit of additional sample code, along with books and files containing a variety of valuable information. You receive this CD when you become a member of the Microsoft DeveloperÕs Network.
  4. MicrosoftÕs Web Site - the Microsoft Web site contains knowledge bases and articles that may be helpful.
  5. Internet News Groups - Numerous newsgroups and mailing lists on the Internet bring C++/MFC developers together to share tips and techniques. There are also other web sites available full of sample code and tips.

Using all of these different forms of documen find anything you need to know. The key is understanding where and how to look for what you need. This book will help accelerate that process tremendously.

Road Map

The tools in Visual C++ require a great deal of prior knowledge if you want to use them effectively. For example, when you open the Visual C++ package and load the CD, you may have the impression that you can use the AppWizard to generate any program you like. Unfortunately, the code that the AppWizard generates is virtually worthless unless you know a good bit about MFC already. That is why this book is structured the way it is. The progression presented in this book is exactly the progression you will need to follow if you do not already know MFC. However, different people come into Visual C++ with varying levels of experience and different goals. Here is a road map to guide you through the material so that you can find the best starting point for your particular situation:

  • If you do not know C++, you will need to learn it. Proceed to the accelerated introduction to C++ in Appendix A of this book.
  • If you want to simply try out Visual C++ and compile some simple programs, proceed to Appendix B. It will show you how the compiler works and how to compile and debug simple applications.
  • If you know C++ but have never done any Windows programming of any kind, proceed to Part 1. It will teach you the fundamentals of event-driven programming and then quickly introduce you to MFC programming.
  • If you have experience with Windows programming in C but have never done Windows programming using C++ and MFC, proceed to Part 1. It will quickly introduce you to the MFC class hi programming.
  • If you have used MFC before (for example, if you are familiar with MFC version 1.0) but are unfamiliar with the new application development tools like the AppWizard and the ClassWizard, skim Part 2 and then proceed to Part 3 for a complete introduction to the tools.
  • If you are familiar with Visual C++ and MFC but want to learn about a variety of techniques that can make your applications look more professional, turn to Part 4. It will show you how to create things like splash screens, expanding dialogs, property sheets, and self-drawn controls.
  • If you are a corporate programmer who needs to attach to a client/server database, pay particular attention to Chapter 33 in Part 5.

Common Questions

The goal of this section is to show you how to find answers to the most common questions about Visual C++ and MFC. You may wish to scan this list now and periodically in the future to quickly find answers to your questions.

Part 1

  1. What is MFC? Why does it exist? See Chapter 1
  2. How do I compile and run a simple MFC program? See Appendix B.3 and Chapter 1.
  3. How do I create a simple "Hello World!" program in MFC? What does the code actually mean? See Chapter 2.
  4. I have found the AppWizard, but when I run it I find it generates 15 files that make absolutely no sense to me. What do I do? See the discussion at the beginning of Part 3 of this book.
  5. How do I create a simple MFC control? See Chapter 3.
  6. How do I customize MFC controls and change their styles? See Chapter 3.
  7. How do I create a push button and respond to its events in MFC? See Chapter 4.
  8. What is a message ma scroll bar and respond to its events? See Chapter 4.
  9. How do I create an edit control and respond to its events? See Chapter 5 and Chapter 8.
  10. How do I create simple applications? See Chapter 5.
  11. How do I make a simple application appropriately handle tab keys, accelerators, etc.? See Chapter 5.

Part 2

  1. What is a resource? What is a resource file? What are the advantages of resources? See Chapter 6.
  2. How do I create and use icon, dialog, menu, string table, and accelerator resources? See Chapter 6.
  3. How do I create a message dialog? A File Open dialog? A Font dialog? A Color dialog? A Print dialog? A Find/Replace dialog? See Chapter 7.
  4. What is the difference between modal and modeless dialogs? See Chapter 7.
  5. How do I use an edit control in single and multi-line modes? See Chapter 8.
  6. How do I create a simple text editor? See Chapter 8.
  7. How do I create and use lists, drop down lists, and combo boxes in my applications? See Chapter 9 and Chapter 20.
  8. How do I make multi-column and tabbed lists? See Chapter 9.
  9. How do I load and display system and custom icons? See Chapters 6 and 10.
  10. How do I change the application cursor? See Chapter 10 and 11.5.3.
  11. How do I display a watch cursor? See Chapter 10.
  12. How do I perform background processing while the application is idle? See Chapter 10.
  13. What is a document template? See Chapter 10 and Chapter 16.
  14. How do I create an MRU file list? See Chapter 10.
  15. How do I use INI files with my applications? See Chapter 10.
  16. How do I draw lines, rectangles, circles, et to an application? See Chapter 11.
  17. How do I respond to mouse clicks in a drawing? See Chapter 11.
  18. How do I create rubber-banded lines, rectangles, etc. in a drawing?
  19. How do I create a drawing space larger than the current window? See Chapters 11 and 15.
  20. How do I create animated drawings? See Chapter 11.
  21. How do I work with text and binary files in MFC? See Chapter 12.
  22. How do I work with strings in MFC? See Chapter 12.
  23. How do I work with time values in MFC? See Chapter 12.
  24. Is there an easy way to create arrays, lists and hash tables in MFC? See Chapter 12.
  25. What debugging facilities are built into MFC? How do I make use of the MFC exception handling mechanisms? See Chapter 13.
  26. How do I use TRACE and ASSERT statements? See Chapter 13.
  27. How do I prevent and detect memory leaks in my applications? See Chapter 13.

Part 3

  1. Are there any simple applications in this book showing me how to use the AppWizard and ClassWizard? See the drawing example, the editor example, the form example and the address list example in Part 3 of this book.
  2. What is the AppWizard? What is the ClassWizard? How do I use them to speed up application development? See Chapter 14.
  3. How do I create a simple framework with the AppWizard? See Chapter 14.
  4. What do all of the files generated by the AppWizard do? See Chapter 14.
  5. What is the document/view paradigm? See Chapters 14, 15 and 18.
  6. What do the STDAFX files do? See Chapter 14.
  7. Can you give me a simple example of the AppWizard and ClassWizard in action? See Chapter 14. use it? See C applications? See Chapter 20.
  8. How do I create Property sheets (tabbed dialogs) in my applications? See Chapter 20.

Part 4

  1. How do DDX and DDV really work behind the scenes? See Chapter 22.
  2. How do I integrate all of the different types of controls and use DDX to access them? See Chapter 22.
  3. Is there a way to create new DDX functions for different data types? See Chapter 22.
  4. How does MFC really work? What is happening inside of MFC? How does a C++ program using MFC compare to a C program? See Chapter 23.
  5. How does MFC handle window handles? See Chapter 23.
  6. Where is the window procedure in an MFC program? See Chapter 23.
  7. How does subclassing work with Windows controls? See Chapter 23.
  8. How can I take an existing control, like the CEdit control, and enhance its behavior without completely rewriting it? How do I integrate a new control like this into a dialog? See Chapter 24.
  9. How do I create list boxes and combo boxes that contain icons, bitmaps or other graphical elements? See Chapter 26.
  10. How do I handle owner-drawn controls in MFC? See Chapter 26.
  11. How do I enumerate fonts and other resources under Windows? See Chapter 26.
  12. How can I add a splash screen to my applications? See Chapter 27.
  13. How do I add expanding dialogs to my applications? See Chapter 28.
  14. How do I stretch a bitmap over an area? See Chapter 29.
  15. How can I draw onto a CStatic control? See Chapter 29.
  16. How do I add a bitmap or a drawing to the background of a dialog or a window? See Chapter 29.
  17. How do I create my own floating pale Manager? See Chapter 32.
  18. How do I make an application float so that it is "always on top." See Chapter 32.
  19. How do I start an application in a minimized or maximized state? See Chapter 32.
  20. How do I create a modelss dialog box? See Chapter 32.
  21. How do I create a mini-frame window? See Chapter 32.
  22. How do I create a popup menu activated by the right mouse button? See Chapter 32.
  23. How do I customize the system menu? See Chapter 32.

Part 5

  1. How to I access SQL databases from an MFC program? Chapter 33.
  2. What is a relational database? What is SQL? See Chapter 33.
  3. What is ODBC? How do I create ODBC data sources? See Chapter 33.
  4. What is the CRecordset class? How do I access databases with it? See Chapter 33.
  5. How do I retrieve records from a database? How do I add and delete records? See Chapter 33.
  6. What is OLE? How can I use it in my applications? See Chapter 34.
  7. What features does OLE support? See Chapter 34.
  8. What is the registry? What is a class ID? See Chapter 34.
  9. How do I create OLE servers and containers with MFC? See Chapter 34.
  10. How do I create an OLE automation server? How do I access an automation server from a Visual Basic or Visual C++? See Chapter 34.
  11. What is an OCX? How do I create an OLE control? See Chapter 34.
  12. What is a thread? How can I use threads to improve applications? See Chapter 35.
  13. What is the difference between worker and user-interface threads? See Chapter 35.
  14. How do thread priorities work? What are they? See Chapter 35.
  15. What is C++? How do I move from C to C++? Se browser? See Appendix B.
  16. What is OpenGL and how do I use it to create realistic graphical images? See Appendix D.
Read More Show Less

Preface

Preface:

Getting Your Bearings

You are probably opening this book because you are new to Windows Programming or because you are new to MFC (Microsoft Foundation Classes) or the Visual C++ programming environment. For example, you might be an experienced UNIX or Macintosh programmer. Or perhaps you have a lot of talent with C programming and command-driven user interfaces on PCs and want to move over to Windows. You may be experienced with Windows programming in C, but have never before used MFC and C++ to develop Windows applications. Regardless of your origin, you will find that as you try to make your transition you are hampered by two problems. The purpose of this book is to quickly solve those problems so that you can begin creating your own professional applications with Visual C++ as quickly as possible.

The first problem is mental: you have to get past the wall that surrounds Visual C++. That wall arises because of the obvious complexity of the Windows and C++ programming environments. When you load Visual C++ from its CD, you notice that there are tens of thousands of pages of documentation, hundreds of sample programs, and untold megabytes of help files. No one has the time to sort through all of this material, but you know that hidden in those megabytes are hundreds of important concepts that you need to master.

The second problem is more pedestrian: you have to pick a place to start. But where should you begin? How do you write a simple Windows application? How do you learn how to write an advanced one?

This book is designed to help you move into the Visual C++ environment rapidly and confidently. The purpose ofthischapter is to help you get your bearings in this new environment. It will introduce you to Visual C++ and then give you a starting point and a direction so that you can become an accomplished Windows programmer very quickly using the most modern tools and techniques available.

What is Visual C++?

The Visual C++ environment is huge and can be extremely intimidating initially. Visual C++ combines a complete suite of powerful tools into a single application development environment, and the first time you face all of these tools it can be very difficult to discern what they all do or how to use them. When you look at the book reader application that comes with the Visual C++ CD-ROM, you face another hurdle: You find thousands and thousands of pages in many different books. The thought of wading through all of these manuals can be daunting.

So letÕs start at the beginning and look at Visual C++ in an organized way. First of all, what is it? Here is a brief summary:

  • Visual C++ is a C++ compiler
  • Visual C++ is a debugging environment
  • Visual C++ is an application framework generator
  • Visual C++ is a project manager
  • Visual C++ is an easy way to design and implement menus, dialogs, and other "resources"
  • Visual C++ is a programmer acceleratorÑseveral tools inside Visual C++ are designed to make you more efficient by making your life as a programmer easier or by reducing the code you must write

In other words, Visual C++ is a complete and extremely powerful application development environment. In order to take full advantage of this environment, you have to become comfortable with all the too to know how they can work together to accelerate your software development cycle.

In its most basic form, Visual C++ is simply a C++ compiler. You can use it to create simple text programs in C or C++. If you would like to try this out, go to Appendix B.1 and work through the example there. You will find that it is extremely easy to write, compile, and debug simple text programs using Visual C++.

Most people who purchase Visual C++ do not want to create text programs, however. They want to create advanced Windows applications that make effective use of the Windows 98 and Windows NT user interface. To do this, you must know C++, and you must understand the MFC hierarchy. MFC is designed make you as productive as possible by encapsulating common Windows code in classes that are already written, tested, and debugged. Once you invest the time to learn MFC, you are greatly rewarded in increased speed, flexibility and robustness.

Part 1 of this book gives you a thorough introduction to MFC. It shows you the basic principles used in every MFC program you write. Part 2 gives a complete overview of all the controls and features that MFC offers. Part 2 contains hundreds of examples that make it easy to understand the different MFC classes.

Once you feel comfortable with MFC, you are ready to begin creating professional Windows applications. Part 3 introduces the AppWizard, the ClassWizard, and the resource editing tools of Visual C++. The AppWizard is your starting point when creating any full-blown Windows application: It helps you by generating a complete file framework that organizes the entire application around a consistent core of MFC classes. The ClassWizard, in combination with the resource editing features that the Visual C++ environment provides, then makes it easy to add to and complete your application by helping you design, create, and install menus, dialog boxes, and other application resources. The ClassWizard also helps you add the code that lets your application respond to user input properly. Using these three toolsÑthe AppWizard, the ClassWizard, and the resource editorsÑtogether with the MFC class hierarchy, it is extremely easy to complete professional applications very quickly. Part 3 contains four different example applications to help demonstrate the process.

Part 4 continues by demonstrating advanced features. It shows you how to use a variety of techniques to create such things as expanding dialogs, property sheets, dialog bars, splash screens, self-drawn controls and bitmapped backgrounds. These techniques add significant utility to your applications when used appropriately. Finally, Part 5 concludes the book by discussing advanced MFC classes for database connectivity, OLE features, and so on.

Available Documentation

The Visual C++ CD-ROM contains over 100 megabytes of on-line documentation covering various aspects of Windows, MFC, and the tools available in Visual C++. It contains many more megabytes of sample code. The MFC class hierarchy contains hundreds of different classes holding thousands of member functions. The Win32 API contains thousands of functions as well. All of this material is documented in on-line help files. Obviously, there is no lack of documentation with this product.

This book, therefore, makes no attempt to replace the documentation. Its goal is to help you wind your way through the Visual C++ forest and find what you need. Using the base you gain from reading this book, you will be able to approach Visual C++ and begin using it in productive ways very quickly.

There are currently seven different types of documentation provided by Microsoft for Visual C++ and MFC:

  1. On-line Books Ð A series of manuals on the CD-ROM that act as the documentation for the system. The collection of books is available from the Contents section of the Help menu. Look at the titles of all the different books and articles available. You will find that there are many. The books cover Visual Studio, the tools within Visual Studio like the compiler, debugger, etc., the many function libraries available, etc
  2. Sample Code Ð The Visual C++ directory on your hard disk may contain a sample directory that contains source code demonstrating a wide variety of techniques. Some of the samples are written in C, while other samples use MFC and C++.
  3. Developer Network CD Ð MicrosoftÕs DeveloperÕs Network CD provides quite a bit of additional sample code, along with books and files containing a variety of valuable information. You receive this CD when you become a member of the Microsoft DeveloperÕs Network.
  4. MicrosoftÕs Web Site - the Microsoft Web site contains knowledge bases and articles that may be helpful.
  5. Internet News Groups - Numerous newsgroups and mailing lists on the Internet bring C++/MFC developers together to share tips and techniques. There are also other web sites available full of sample code and tips.

Using all of these different forms of documen find anything you need to know. The key is understanding where and how to look for what you need. This book will help accelerate that process tremendously.

Road Map

The tools in Visual C++ require a great deal of prior knowledge if you want to use them effectively. For example, when you open the Visual C++ package and load the CD, you may have the impression that you can use the AppWizard to generate any program you like. Unfortunately, the code that the AppWizard generates is virtually worthless unless you know a good bit about MFC already. That is why this book is structured the way it is. The progression presented in this book is exactly the progression you will need to follow if you do not already know MFC. However, different people come into Visual C++ with varying levels of experience and different goals. Here is a road map to guide you through the material so that you can find the best starting point for your particular situation:

  • If you do not know C++, you will need to learn it. Proceed to the accelerated introduction to C++ in Appendix A of this book.
  • If you want to simply try out Visual C++ and compile some simple programs, proceed to Appendix B. It will show you how the compiler works and how to compile and debug simple applications.
  • If you know C++ but have never done any Windows programming of any kind, proceed to Part 1. It will teach you the fundamentals of event-driven programming and then quickly introduce you to MFC programming.
  • If you have experience with Windows programming in C but have never done Windows programming using C++ and MFC, proceed to Part 1. It will quickly introduce you to the MFC class hi programming.
  • If you have used MFC before (for example, if you are familiar with MFC version 1.0) but are unfamiliar with the new application development tools like the AppWizard and the ClassWizard, skim Part 2 and then proceed to Part 3 for a complete introduction to the tools.
  • If you are familiar with Visual C++ and MFC but want to learn about a variety of techniques that can make your applications look more professional, turn to Part 4. It will show you how to create things like splash screens, expanding dialogs, property sheets, and self-drawn controls.
  • If you are a corporate programmer who needs to attach to a client/server database, pay particular attention to Chapter 33 in Part 5.

Common Questions

The goal of this section is to show you how to find answers to the most common questions about Visual C++ and MFC. You may wish to scan this list now and periodically in the future to quickly find answers to your questions.

Part 1

  1. What is MFC? Why does it exist? See Chapter 1
  2. How do I compile and run a simple MFC program? See Appendix B.3 and Chapter 1.
  3. How do I create a simple "Hello World!" program in MFC? What does the code actually mean? See Chapter 2.
  4. I have found the AppWizard, but when I run it I find it generates 15 files that make absolutely no sense to me. What do I do? See the discussion at the beginning of Part 3 of this book.
  5. How do I create a simple MFC control? See Chapter 3.
  6. How do I customize MFC controls and change their styles? See Chapter 3.
  7. How do I create a push button and respond to its events in MFC? See Chapter 4.
  8. What is a message ma scroll bar and respond to its events? See Chapter 4.
  9. How do I create an edit control and respond to its events? See Chapter 5 and Chapter 8.
  10. How do I create simple applications? See Chapter 5.
  11. How do I make a simple application appropriately handle tab keys, accelerators, etc.? See Chapter 5.

Part 2

  1. What is a resource? What is a resource file? What are the advantages of resources? See Chapter 6.
  2. How do I create and use icon, dialog, menu, string table, and accelerator resources? See Chapter 6.
  3. How do I create a message dialog? A File Open dialog? A Font dialog? A Color dialog? A Print dialog? A Find/Replace dialog? See Chapter 7.
  4. What is the difference between modal and modeless dialogs? See Chapter 7.
  5. How do I use an edit control in single and multi-line modes? See Chapter 8.
  6. How do I create a simple text editor? See Chapter 8.
  7. How do I create and use lists, drop down lists, and combo boxes in my applications? See Chapter 9 and Chapter 20.
  8. How do I make multi-column and tabbed lists? See Chapter 9.
  9. How do I load and display system and custom icons? See Chapters 6 and 10.
  10. How do I change the application cursor? See Chapter 10 and 11.5.3.
  11. How do I display a watch cursor? See Chapter 10.
  12. How do I perform background processing while the application is idle? See Chapter 10.
  13. What is a document template? See Chapter 10 and Chapter 16.
  14. How do I create an MRU file list? See Chapter 10.
  15. How do I use INI files with my applications? See Chapter 10.
  16. How do I draw lines, rectangles, circles, et to an application? See Chapter 11.
  17. How do I respond to mouse clicks in a drawing? See Chapter 11.
  18. How do I create rubber-banded lines, rectangles, etc. in a drawing?
  19. How do I create a drawing space larger than the current window? See Chapters 11 and 15.
  20. How do I create animated drawings? See Chapter 11.
  21. How do I work with text and binary files in MFC? See Chapter 12.
  22. How do I work with strings in MFC? See Chapter 12.
  23. How do I work with time values in MFC? See Chapter 12.
  24. Is there an easy way to create arrays, lists and hash tables in MFC? See Chapter 12.
  25. What debugging facilities are built into MFC? How do I make use of the MFC exception handling mechanisms? See Chapter 13.
  26. How do I use TRACE and ASSERT statements? See Chapter 13.
  27. How do I prevent and detect memory leaks in my applications? See Chapter 13.

Part 3

  1. Are there any simple applications in this book showing me how to use the AppWizard and ClassWizard? See the drawing example, the editor example, the form example and the address list example in Part 3 of this book.
  2. What is the AppWizard? What is the ClassWizard? How do I use them to speed up application development? See Chapter 14.
  3. How do I create a simple framework with the AppWizard? See Chapter 14.
  4. What do all of the files generated by the AppWizard do? See Chapter 14.
  5. What is the document/view paradigm? See Chapters 14, 15 and 18.
  6. What do the STDAFX files do? See Chapter 14.
  7. Can you give me a simple example of the AppWizard and ClassWizard in action? See Chapter 14.
  8. How paradigm? See Chapter 15.
  9. What is the difference between an SDI and an MDI application? See Chapter 15.
  10. How do I understand what is going on inside the AppWizard framework? See Section 15.3 and Chapter 21.
  11. How do I add new menus and menu options to an application? See Chapter 15.
  12. How do I add scrolling to a drawing application? How do I use splitter windows? See Chapter 15.
  13. How do I add a new dialog to an AppWizard framework? How do I use DDX and DDV? See Chapters 15 and 18.
  14. How do I add a dialog class with the ClassWizard? See Chapters 15 and 18.
  15. How do I add printing to an application? What do the MFC printing functions do? How do I handle multi-page printing? See Chapters 15 and 18.
  16. How do I create a text editor with the AppWizard? See Chapter 16.
  17. How do I handle multiple document types in a single MDI application? See Chapter 16.
  18. What is a document template? See Chapter 16.
  19. How do I use form views? How do I put controls on the face of an application? See Chapter 17.
  20. Can you give me an example that combines all of these different concepts in a single application? See Chapter 18.
  21. How do I create a resizable tabbed list in a form view? See Chapter 18.
  22. How do I enable and disable menu options? See Chapters 18 and 6.
  23. How do I customize the tool bar and status bar? See Chapter 18.
  24. How do I work with the clipboard in an application? See Chapter 18.
  25. How do I print text information from an application? See Chapter 18.
  26. How do I add context sensitive help to my applications? See Chapter 19.
  27. What is the help compiler and how do I use it? See C applications? See Chapter 20.
  28. How do I create Property sheets (tabbed dialogs) in my applications? See Chapter 20.

Part 4

  1. How do DDX and DDV really work behind the scenes? See Chapter 22.
  2. How do I integrate all of the different types of controls and use DDX to access them? See Chapter 22.
  3. Is there a way to create new DDX functions for different data types? See Chapter 22.
  4. How does MFC really work? What is happening inside of MFC? How does a C++ program using MFC compare to a C program? See Chapter 23.
  5. How does MFC handle window handles? See Chapter 23.
  6. Where is the window procedure in an MFC program? See Chapter 23.
  7. How does subclassing work with Windows controls? See Chapter 23.
  8. How can I take an existing control, like the CEdit control, and enhance its behavior without completely rewriting it? How do I integrate a new control like this into a dialog? See Chapter 24.
  9. How do I create list boxes and combo boxes that contain icons, bitmaps or other graphical elements? See Chapter 26.
  10. How do I handle owner-drawn controls in MFC? See Chapter 26.
  11. How do I enumerate fonts and other resources under Windows? See Chapter 26.
  12. How can I add a splash screen to my applications? See Chapter 27.
  13. How do I add expanding dialogs to my applications? See Chapter 28.
  14. How do I stretch a bitmap over an area? See Chapter 29.
  15. How can I draw onto a CStatic control? See Chapter 29.
  16. How do I add a bitmap or a drawing to the background of a dialog or a window? See Chapter 29.
  17. How do I create my own floating pale Manager? See Chapter 32.
  18. How do I make an application float so that it is "always on top." See Chapter 32.
  19. How do I start an application in a minimized or maximized state? See Chapter 32.
  20. How do I create a modelss dialog box? See Chapter 32.
  21. How do I create a mini-frame window? See Chapter 32.
  22. How do I create a popup menu activated by the right mouse button? See Chapter 32.
  23. How do I customize the system menu? See Chapter 32.

Part 5

  1. How to I access SQL databases from an MFC program? Chapter 33.
  2. What is a relational database? What is SQL? See Chapter 33.
  3. What is ODBC? How do I create ODBC data sources? See Chapter 33.
  4. What is the CRecordset class? How do I access databases with it? See Chapter 33.
  5. How do I retrieve records from a database? How do I add and delete records? See Chapter 33.
  6. What is OLE? How can I use it in my applications? See Chapter 34.
  7. What features does OLE support? See Chapter 34.
  8. What is the registry? What is a class ID? See Chapter 34.
  9. How do I create OLE servers and containers with MFC? See Chapter 34.
  10. How do I create an OLE automation server? How do I access an automation server from a Visual Basic or Visual C++? See Chapter 34.
  11. What is an OCX? How do I create an OLE control? See Chapter 34.
  12. What is a thread? How can I use threads to improve applications? See Chapter 35.
  13. What is the difference between worker and user-interface threads? See Chapter 35.
  14. How do thread priorities work? What are they? See Chapter 35.
  15. What is C++? How do I move from C to C++? Se browser? See Appendix B.
  16. What is OpenGL and how do I use it to create realistic graphical images? See Appendix D.
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)