*Covers basic and advanced controls, Internet and database development *Features reusable custom C++ classes to handle real-world tasks *Up-to-date coverage of Windows 2000 and Windows CE capabilities *Show-and-tell presentation for quick learning See the code and put it to work-fast, easy, and hands on. This quick, visual tutorial uses annotated "snapshots" of real code on every other page to teach you programming theory while providing specific solutions you can use in your own projects. Development solutions cover every current Windows platform, including Windows 95, 98, 2000, NT, or CE. Practical, comprehensive coverage includes: *Event-driven programming with the AppWizard and MFC application framework *Menus, dialog boxes, and Windows *Printing and GDI functions *Database programs using MFC classes *Internet programs with CGI, sockets, SMTP, ISAPI filters, and ActiveX *Reusable custom C++ classes for common programming tasks No matter what flavor of Windows you use, Windows Programming Programmers Notebook will put you "in the picture" and get you up and programming right away.
Table of Contents:
1. Preparing Yourself for Windows Programming.
Windows Procedure. A Complete SDK Windows Application. Message Boxes. Dialog-Based Windows Applications. Creating Programs with Visual C++ and AppWizard. Creating an SDK Program. Microsoft Foundation Classes. Running AppWizard. Enhancing a MFC Application Framework. Compiling a Windows Program. Distributing a Windows Program.
2. Menus.
Checking/Unchecking a Menu Item in an SDK Program. Determining the Status of a Menu Item. Sample SDK Program with Menu. Responding to Menu Choices in an MFC Program. Enabling and Checking Menu Items in an MFC Program. Pop-up Menus—SDK. Pop-up Menus—MCF. Responding to Messages—SDK and MFC.
3. Dialog Boxes.
Adding a Dialog. Dialog Box Procedure. Displaying or Popping up a Dialog. Dialog Box as a Main Window. Dialog-Based Application—SDK. Dialog-Based Applications—MFC. Using Dialogs for Data Entry. Data Input Dialog. Add Code to the Main Dialog. Creating a Modeless Dialog. Common Dialogs. File Open Dialog. File Save Common Dialog. Page Setup Dialog. Color Selection Dialog. Text Find and Replace Dialogs. Font Selection Dialog Box. Printer Selection. Browse for Folders.
4. Windowing.
Creating a Window at Runtime—SDK. Creating a Window at Runtime—MFC. Creating a Window at Design Time. Get Child Window from a Parent—MFC and SDK. Position and Sizing a Window. Changing the Position or Size of a Window. Move, Resize, and 'Top Most' a Window. Adding the Always on Top Handler to Your Code. Hiding and Showing a Window. Enabling and Disabling a Window. Controlling Window Fonts. Simple Font Creation SDK and MFC. Creating the Font and Initializing the Window. Deleting the Font When No Longer Needed. Creating the Persistent Font and Setting the Control to Use It. Deleting the Font When No Longer Needed. Focus. Focus Notification and Predefined Windows. Focus Notification and Common Control Windows.
5. Basic Controls.
Window Text. Fonts. Changing Control Colors. Dynamically Created Controls. Buttons. Check Boxes. Radio Buttons. List Boxes. Edit Boxes. Static Controls.
6. Common Controls.
Spin Controls. Progress Bars. Sliders/Trackbar Controls. Image Lists. List View Controls. Tree View Controls. Tab Control. Animation Controls. Data Time Picker and Month Controls.
7. Printing.
Mapping Modes. Printers and Margin Settings. Default Margins. Invoking the Page Setup Dialog for Margins. Obtaining Current Printer DC. Margins, Mapping Modes, and Non-Printable Areas. Determining Output Width of Text. Pagination and Report Starting/Stopping. Determining Print vs. PrintPreview. Multiple Report Types.
8. Databases.
Filtering and Sorting with ODBC\CRecordset and DAO\CdaoRecordset. Inserting Records with ODBC\CRecordset and DAO\CdaoRecordset. Editing Records with ODBC\CRecordset and DAO\CdaoRecordset. Deleting Records with ODBC\CRecordset and DAO\CdaoRecordset. Bind Fields to On Screen Controls with CRecordset and CdaoRecordset. Working with Non-Bound Recordsets. Determining Unique IDs for New Records. Executing SQL Commands with ODBC or DAO. Opening and Closing an ADO Recordset. Filtering and Sorting with ADO Recordsets. Adding Records with ADO Recordsets. Editing Records with ADO Recordsets. Deleting Records with ADO Recordsets. Bind Fields to On Screen Controls with ADO. Executing SQL Commands with ODBC or DAO.
9. Internet and Intranet Programming.
Client-Server Programming. Developing Client/Server Programs on a Single Machine. CGI Programming. CGI Output. Creating a Simple CGI Program. CGI Input. GET vs. POST. Parsing Input. CGI with Database Access. Socket Communications. Service Protocols. Initializing Windows Sockets. Primary Socket Functions. Using Htonl and Htons. Examples of Using the CPNSocket Class. SMTP Classes. Creating the CPNSMTP class, from CPNCommandSocket. Example of Sending Email. HTML Display. Using the CHTML View View Class. Using the Web Browser ActiveX Control. ISAPI Filter. Creating the ISAPI Filter. Installing the ISAPI Filter. Setting Up the No Access Web Page.
10. Windows CE and Windows 2000 Programming.
Windows CE Programming. Developing Programs for Windows CE. The Windows CE Emulator. Key Differences in Windows CE Programs. MFC Class Difference for Windows CE. Creating a Windows CE Program with MFC. Creating a Windows CE Installation. Windows 2000 Programming. Compatibility. Determining Windows Version. Visual Studio Plus Pack/Windows 2000 Readiness Kit. Using Win2000 Options. User Interface Changes. The Windows Installer. Creating a Windows Installer Project. Active Directory Services.
11. Messages, Timers, and Threads.
Message Pumps. Message Pump Performance. Idle Time Performance. Timers. Timer Performance. Threads. Starting Thread. Stopping Thread. Synchronization. CSemaphore Synchronization. Message Notification. CSingleLock and CMultiLock. A Multithread Example.
Appendix.