Preface | p. xix |
Understanding Windows Concepts and Terminology | p. 1 |
Reasons For Developing Windows Applications | p. 1 |
Objects Are Everything | p. 2 |
Key Elements of Windows | p. 3 |
Beginnings: Windows | p. 3 |
Windows As Operating Systems | p. 3 |
Common User Interface | p. 4 |
Preemptive Multitasking | p. 4 |
Greatly Improved Memory Management | p. 5 |
Queue-based Input | p. 5 |
Message-based Communication | p. 6 |
Hardware Independence | p. 6 |
Plug and Play | p. 8 |
Reusable Dynamic Link Libraries | p. 8 |
Win16 versus Win32 | p. 9 |
Platform Independence | p. 10 |
All Platform Compatibility with Win32s | p. 10 |
Multiprocessing | p. 12 |
Scalability | p. 12 |
Distributed Computing | p. 13 |
Security | p. 13 |
Windows Open Systems Architecture | p. 13 |
Crash Management | p. 13 |
Virtual Memory | p. 14 |
Comparison of Windows | p. 14 |
Support for New Technologies | p. 16 |
New Wizards and Utilities | p. 16 |
Getting Started | p. 16 |
Required Software | p. 17 |
System Requirements | p. 17 |
Windows 98 and NT Concepts and Terminology | p. 17 |
Windows versus windows | p. 18 |
Creating the "Look" | p. 19 |
The Window Border | p. 19 |
The Window Title Bar | p. 19 |
The Control Box | p. 19 |
The System Menu | p. 19 |
The Minimize Box | p. 20 |
The Maximize Box | p. 20 |
The Terminate Box | p. 20 |
The Vertical Scroll Bar | p. 20 |
The Horizontal Scroll Bar | p. 20 |
The Menu Bar | p. 21 |
The Client or Work Area | p. 21 |
Object Classes to the Rescue | p. 21 |
Using Object-Oriented Technology | p. 22 |
Icon Objects | p. 23 |
Cursor Objects | p. 23 |
Caret Objects | p. 23 |
Message Box Objects | p. 24 |
Dialog Box Objects | p. 24 |
Font Objects | p. 24 |
Bitmap Objects | p. 25 |
Pen Objects | p. 25 |
Brush Objects | p. 26 |
Communication Via Messages | p. 26 |
Standard Message Formats | p. 27 |
Who Sends Messages? | p. 28 |
Processing Messages | p. 29 |
The Standard Message Loop | p. 29 |
Standard Windows Resources | p. 30 |
Standard Windows Functions | p. 31 |
Calling Convention | p. 31 |
A First Look at WINDOWS.H | p. 32 |
Understanding the Style of Windows Code | p. 32 |
The Seven Fundamental Steps for Developing Windows Programs | p. 34 |
The Visual C/C++ Compiler | p. 34 |
The Resource Editor | p. 34 |
The Resource Compiler | p. 34 |
Using The Linker | p. 34 |
In the Next Chapter... | p. 35 |
Step by Step: Writing Simple Windows Applications | p. 37 |
Ways to Develop Windows Applications | p. 37 |
Starting the Visual Studio | p. 38 |
Starting a New Project | p. 40 |
Adding Files to a Project | p. 45 |
Generating the Executable | p. 53 |
Executing Your First Program | p. 55 |
Understanding the Simple Windows Template | p. 57 |
The Comment Block | p. 57 |
[windows.h] | p. 58 |
The Callback Function | p. 58 |
A Brief Word About Handles | p. 59 |
The WinMainO Function | p. 60 |
Understanding MSG | p. 62 |
Understanding WNDCLASS | p. 63 |
swt.cpp WNDCLASS wcApp | p. 65 |
Understanding RegisterClassO | p. 66 |
Understanding Create WindowO | p. 68 |
Showing and Updating a Window | p. 68 |
Creating a Message Loop | p. 69 |
Using GetMessageO | p. 69 |
Using TranslateMessageO | p. 70 |
Using DispatchMessageO | p. 70 |
WinMainO return | p. 70 |
The Required Window Function | p. 71 |
The WM_PAINT Message | p. 79 |
The WM_DESTROY Message | p. 81 |
The DefWindowProcO Function | p. 81 |
The basetsd.h File | p. 81 |
Using the Workspace Pane | p. 82 |
Additional ReBuild All... File Entries | p. 83 |
Additional Rebuild All... Debug File Entries | p. 84 |
In the Next Chapter | p. 87 |
Windows Details | p. 89 |
Accessing the Windows Environment | p. 89 |
The Coordinate System | p. 90 |
Basic Mapping Modes | p. 90 |
Understanding Device Coordinates | p. 92 |
Understanding Viewports | p. 92 |
Changing Viewport and Window Extents | p. 93 |
User-Defined Coordinates | p. 93 |
Choosing Initial Window Sizes, Position, Icons, Cursors, and Styles | p. 94 |
Displaying the Window with ShowWindowO | p. 112 |
Changing the Window with SetClassWordO or SetClassLongO | p. 114 |
Commonly Used Controls and Dialog Boxes | p. 114 |
What Is a Static Control? | p. 115 |
What Is a Push-Button Control? | p. 114 |
What Is a Radio-Button Control? | p. 115 |
What Is a Check-Box Control? | p. 115 |
What Is a List Box? | p. 115 |
What Is an Edit Box? | p. 116 |
What Is a Scroll Bar Control? | p. 117 |
What Is A Virtual Key? | p. 117 |
What Is A System Timer? | p. 120 |
What Makes the Timer Tick? | p. 121 |
Effective Use of Timers | p. 121 |
Memory | p. 122 |
Memory Allocation via the Operating System | p. 123 |
Managing Your Memory | p. 123 |
Changing a Windows Background Color | p. 125 |
Examining the Application File (backgnd.cpp) | p. 128 |
Changing a Windows Mapping Mode | p. 130 |
Examining the Application File (mapper.cpp) | p. 133 |
Using the System Timer to Control Messages | p. 136 |
Examining the Application File (systimer.cpp) | p. 139 |
What's Next? | p. 141 |
Using Graphics Device Interface Drawing Primitives | p. 143 |
The Graphics Device Interface | p. 143 |
The GDI Environment | p. 144 |
The Default Pixel Mapping Mode | p. 144 |
Information on Installed Devices | p. 144 |
Using the Device Context Handle | p. 149 |
An Introduction to GDI Drawing Primitives | p. 150 |
Frequently Used Graphics Primitives | p. 150 |
The ArcO and ArcToO Functions | p. 151 |
The ChordO Function | p. 151 |
The EllipseO (and Circle) Function | p. 152 |
The LineToO Function | p. 153 |
The MoveToExO Function | p. 154 |
The PieO Function | p. 154 |
The PolygonO Function | p. 155 |
The PolylineO and PolylineToO Functions | p. 156 |
The RectangleO Function | p. 157 |
The RoundRectO Function | p. 157 |
The SetPixelO and GetPixelO Functions | p. 157 |
GDI Tools And Techniques | p. 158 |
Pens | p. 158 |
Brushes | p. 159 |
Changing Text Colors | p. 161 |
Drawing Mode Selection | p. 162 |
Simple Applications Using GDI Tools and Techniques | p. 163 |
Drawing a Variety of Shapes | p. 163 |
Creating a Simple Bar Chart | p. 168 |
Manipulating Bitmapped Images | p. 175 |
The BitBltO Bitmap Function | p. 176 |
Loading and Drawing Bitmapped Images | p. 181 |
Writing GDI Applications | p. 187 |
Taking Control of the Window | p. 189 |
Understanding Scroll Bars | p. 190 |
Speaking of Scroll Bars | p. 190 |
Scroll Bar Constants | p. 191 |
Scroll Bar Range | p. 192 |
Scroll Bar Position | p. 192 |
Two Types of Scroll Bars | p. 192 |
Adding Scroll Bars to an Application | p. 193 |
Examining the Application File (scroll.cpp) | p. 199 |
WM_CREATE | p. 201 |
WM_SIZE | p. 201 |
WM_HSCROLL | p. 203 |
WM_VSCROLL | p. 204 |
A Word About WM_PAINT | p. 204 |
Using Scroll Bars and the System Timer | p. 204 |
Examining the Application File (ticker.cpp) | p. 208 |
WM_TIMER | p. 209 |
What's Happening in WM_PAINT | p. 210 |
Scroll Bars Used to Scroll a Table of Information | p. 211 |
Examining the Application File (loan.cpp) | p. 218 |
The WM_PAINT Message Handler | p. 219 |
Scroll Bars and Graphics | p. 223 |
Examining the Application File (graphics.cpp) | p. 228 |
Scrolling Images under WM_PAINT | p. 228 |
What's Next? | p. 230 |
Using Fonts | p. 231 |
Windows Font Definitions | p. 231 |
Font Constants | p. 232 |
The TEXTMETRIC Structure | p. 234 |
The LOGFONTA Structure | p. 265 |
The Font Character Cell | p. 237 |
Font Basics | p. 238 |
Font Widths | p. 239 |
Automatic Leading and Kerning | p. 239 |
OEM Versus ANSI Character Sets | p. 239 |
Logical Versus Physical Fonts | p. 240 |
Vector, Raster, and TrueType Fonts | p. 240 |
A Scheme for Mapping Fonts | p. 240 |
Font Families | p. 241 |
System Default Fonts | p. 242 |
Using Printer Fonts | p. 242 |
Font Change Example Programs | p. 242 |
The CreateFontO Function | p. 242 |
The CreateFontIndirect Function | p. 244 |
The CF Application | p. 245 |
The cf.cpp Application File | p. 247 |
The CFI Application | p. 250 |
The cfi.cpp Application File | p. 252 |
The Count Application | p. 253 |
The count.cpp.Application File | p. 256 |
Looking Ahead | p. 257 |
Working with Icons and Cursors | p. 259 |
Icons and the Resource Editor | p. 257 |
Icon Sizes | p. 260 |
Custom or Standard Icons? | p. 261 |
Working with a Large Custom Icon | p. 262 |
Working with Large and Small Icons | p. 268 |
Special Icon Functions | p. 273 |
The LoadIconO Function | p. 273 |
The DrawIconO and DrawIconExO Functions | p. 274 |
The CreateconIndirectO Function | p. 274 |
The DestroyIconO Function | p. 275 |
Cursors and the Resource Editor | p. 275 |
Custom or Standard Cursors | p. 276 |
Working with a Custom Cursor | p. 278 |
Special Cursor Functions | p. 281 |
The LoadCursorO Function | p. 282 |
The LoadCursorFromFileO Function | p. 283 |
The SetCursorO Function | p. 284 |
The SetCursorPosO Function | p. 284 |
The ShowCursorO Function | p. 285 |
What's Next? | p. 285 |
Adding Multimedia Sound Resources | p. 287 |
Finding and Making Sound Resources | p. 287 |
Finding Resources Already on Your Computer | p. 288 |
Finding Resources on the Internet | p. 292 |
Making Your Own Sound Resources with the Sound Recorder | p. 294 |
The sndPlaySoundO Function | p. 297 |
Adding Multimedia Sound Resources to an Application | p. 298 |
More Resources? | p. 300 |
Creating and Displaying Bitmaps | p. 301 |
Images in the Window | p. 301 |
Important Windows Bitmap Functions | p. 302 |
The BitBltO Function | p. 302 |
Working with GDI Images | p. 303 |
Working with Photographs and Scanned Images | p. 304 |
The StretchBltO Function | p. 306 |
The SetStretchBltModeO Function | p. 306 |
Complete Bitmap Examples | p. 309 |
A GDI Graphics Example | p. 309 |
Using a Scanned Bitmap Image | p. 312 |
Working with a Bitmapped Photograph | p. 320 |
More Resources? | p. 328 |
Adding Menu and Keyboard Accelerators | p. 329 |
Menu Concepts | p. 330 |
What Is a Menu? | p. 330 |
Designing a Menu | p. 330 |
Designing Keyboard Accelerators | p. 338 |
The Resource File | p. 341 |
Menus--A Variety of Options | p. 345 |
Using a Menu to Change the Size of Graphics Shapes | p. 345 |
The Header File (Resource.h) | p. 350 |
The C++ Source Code File (Menu1.cpp) | p. 351 |
Changing a Background Color with a Menu | p. 352 |
The Header File (Resource.h) | p. 357 |
The Resource File (Menu2.rc) | p. 358 |
The C++ Source Code File (Menu2.cpp) | p. 359 |
Determining System Information with a Menu | p. 361 |
The Header File (Resource.h) | p. 366 |
The Resource File (Menu3.rc) | p. 366 |
The C++ Source Code File (Menu3.cpp) | p. 367 |
Obtaining Directory Listings with a Menu | p. 370 |
The Header File (resource.h) | p. 377 |
The Resource File (menu4.rc) | p. 377 |
The C++ Source Code File (Menu4.cpp) | p. 378 |
What's Next? | p. 380 |
Adding Dialog Boxes | p. 381 |
What Is a Dialog Box? | p. 385 |
The Resource Editor | p. 386 |
Why Use Resource Editor? | p. 386 |
Using the Resource Editor | p. 387 |
Using Controls in a Dialog Box | p. 389 |
Creating an About Dialog Box | p. 392 |
Dialog Boxes Solve a Variety of Input Needs | p. 394 |
An About Dialog Box Application | p. 394 |
The Application File (AboutDlg.cpp) | p. 399 |
Using Radio Buttons in a Dialog Box | p. 401 |
The Application File (ShapeDlg.cpp) | p. 408 |
Entering Text and Integers in a Dialog Box | p. 411 |
The Application File (TxtIntDlg.cpp) | p. 418 |
Entering Real Numbers in a Dialog Box | p. 421 |
The Application File (RealMessgDlg.cpp) | p. 428 |
Get Ready | p. 432 |
Special Controls and Dialog Boxes | p. 433 |
Toolbars and Tooltips | p. 434 |
Toolbar Bitmaps | p. 435 |
The resource.h Header File | p. 435 |
The toolbar.rc Resource Script File | p. 437 |
The toolbar.cpp Source Code File | p. 438 |
Unique Source Code | p. 445 |
Investigating the Spin and Progress Bar Common Controls | p. 448 |
A Spin or Up-Down Control | p. 448 |
A Progress Control | p. 453 |
Project Code | p. 456 |
Unique Features | p. 463 |
The Common Font Dialog Box | p. 469 |
The resource.h Header File | p. 469 |
The CommFont.rc Resource Script File | p. 470 |
The CommFont.cpp Source Code | p. 471 |
Unique Source Code | p. 475 |
The Common Color Dialog Box | p. 478 |
The resource.h Header File | p. 480 |
The CommColor.rc Resource Script File | p. 481 |
The CommColor.cpp Source Code | p. 482 |
Unique Source Code | p. 485 |
What's Coming? | p. 491 |
Developing Complete Applications | p. 493 |
The Pie Chart | p. 493 |
Unique Coding Features | p. 509 |
WM_CREATE | p. 510 |
WM_COMMAND | p. 510 |
WM_SIZE | p. 512 |
WM_PAINT | p. 513 |
WM_DESTROY | p. 517 |
The Bar Chart | p. 517 |
Unique Coding Features | p. 535 |
WM_CREATE | p. 535 |
WM_COMMAND | p. 535 |
WM_SIZE | p. 538 |
WM_PAINT | p. 538 |
WM_DESTROY | p. 544 |
Charting Variations | p. 544 |
Sketching, Animation, and Video | p. 545 |
A Mouse Sketching Application | p. 545 |
The Sketch Files | p. 546 |
The Sketch.cpp Application Code | p. 556 |
Flying Saucer Animation Application | p. 559 |
A Video Player Application | p. 570 |
The Common File Selection Dialog Box | p. 576 |
The Code for Playing AVI Files | p. 580 |
Experiment and Have Fun | p. 581 |
Building Screen Saver Applications | p. 583 |
A Screen Saver Application | p. 584 |
Screen Saver Components | p. 584 |
The ScrSav Screen Saver Project | p. 586 |
Source Code Details | p. 595 |
Building the Application | p. 596 |
Is There More? | p. 599 |
What's Next? | p. 601 |
A Look at the Microsoft Foundation Class Library | p. 601 |
Why Do I Need the MFC Library? | p. 602 |
Design Considerations | p. 602 |
CObject | p. 603 |
Important Parent Classes | p. 605 |
MFC Programming Concepts | p. 610 |
Creating a Window | p. 610 |
Using the afxwin.h Header File | p. 611 |
CTheApp from CWinApp | p. 612 |
The CFrameWnd Class | p. 613 |
Using Member Functions | p. 615 |
The Constructor | p. 615 |
Executing the MFC Application | p. 615 |
A Complete MFC Application | p. 616 |
The SwtMFC.h Header File | p. 618 |
The Application File | p. 618 |
Running the SwtMFC Project | p. 619 |
What's Really Next? | p. 623 |
Index | p. 625 |
Table of Contents provided by Syndetics. All Rights Reserved. |