Training
Certifications
Books
Special Offers
Community




 
Programming Windows®, Fifth Edition
Author Charles Petzold
Pages 1520
Disk 1 Companion CD(s)
Level All Levels
Published 11/11/1998
ISBN 9781572319950
Price $59.99
To see this book's discounted price, select a reseller below.
 

More Information

About the Book
Table of Contents
Sample Chapter
Related Series
Related Books
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books

 

Table of Contents (continued)


Section II    More Graphics
Chapter 13    Using the Printer 597
Printing Fundamentals 598
Printing and Spooling 598
The Printer Device Context 602
The Revised DEVCAPS Program 605
The PrinterProperties Call 615
Checking for BitBlt Capability 616
The Simplest Printing Program 617
Printing Graphics and Text 619
Bare-Bones Printing 622
Canceling Printing with an Abort Procedure 623
How Windows Uses AbortProc 625
Implementing an Abort Procedure 625
Adding a Printing Dialog Box 628
Adding Printing to POPPAD 633
  
Chapter 14    Bitmaps and Bitblts 641
Bitmap Basics 641
Where Do Bitmaps Come From? 642
Bitmap Dimensions 643
Color and Bitmaps 644
Real-World Devices 644
Bitmap Support in GDI 647
The Bit-Block Transfer 648
A Simple BitBlt 648
Stretching the Bitmap 652
The StretchBlt Mode 656
The Raster Operations 657
The Pattern Blt 659
The GDI Bitmap Object 662
Creating a DDB 662
The Bitmap Bits 665
The Memory Device Context 666
Loading Bitmap Resources 667
The Monochrome Bitmap Format 671
Brushes from Bitmaps 674
Drawing on Bitmaps 677
The Shadow Bitmap 682
Using Bitmaps in Menus 687
Nonrectangular Bitmap Images 701
Some Simple Animation 707
Bitmaps Outside the Window 711
  
Chapter 15    The Device-Independent Bitmap 723
The DIB File Format 724
The OS/2-Style DIB 725
Bottoms Up! 728
The DIB Pixel Bits 728
The Expanded Windows DIB 730
Reality Check 733
DIB Compression 734
Color Masking 737
The Version 4 Header 740
The Version 5 Header 744
Displaying DIB Information 746
Displaying and Printing 755
Digging Into the DIB 755
Pixel to Pixel 758
The Topsy-Turvy World of DIBs 769
Sequential Display 777
Stretching to Fit 786
Color Conversion, Palettes, and Performance 797
The Union of DIBs and DDBs 799
Creating a DDB from a DIB 799
From DDB to DIB 808
The DIB Section 808
More DIB Section Differences 817
The File-Mapping Option 818
In Summary 820
  
Chapter 16    The Palette Manager 821
Using Palettes 821
Video Hardware 822
Displaying Gray Shades 823
The Palette Messages 831
The Palette Index Approach 832
Querying the Palette Support 836
The System Palette 837
Other Palette Functions 837
The Raster-Op Problem 838
Looking at the System Palette 839
Palette Animation 850
The Bouncing Ball 851
One-Entry Palette Animation 859
Engineering Applications 865
Palettes and Real-World Images 870
Palettes and Packed DIBs 870
The All-Purpose Palette 883
The Halftone Palette 890
Indexing Palette Colors 896
Palettes and Bitmap Objects 902
Palettes and DIB Sections 909
A Library for DIBs 915
The DIBSTRUCT Structure 917
The Information Functions 918
Reading and Writing Pixels 927
Creating and Converting 932
The DIBHELP Header File and Macros 946
The DIBBLE Program 949
Simple Palettes; Optimized Palettes 975
Converting Formats 991
  
Chapter 17    Text and Fonts 997
Simple Text Output 997
The Text Drawing Functions 997
Device Context Attributes for Text 1000
Using Stock Fonts 1002
Background on Fonts 1002
The Types of Fonts 1003
TrueType Fonts 1004
Attributes or Styles? 1005
The Point Size 1005
Leading and Spacing 1005
The Logical Inch Problem 1006
The Logical Font 1007
Logical Font Creation and Selection 1007
The PICKFONT Program 1009
The Logical Font Structure 1026
The Font-Mapping Algorithm 1030
Finding Out About the Font 1031
Character Sets and Unicode 1033
The EZFONT System 1035
Font Rotation 1044
Font Enumeration 1046
The Enumeration Functions 1046
The ChooseFont Dialog 1047
Paragraph Formatting 1057
Simple Text Formatting 1058
Working with Paragraphs 1059
Previewing Printer Output 1069
The Fun and Fancy Stuff 1082
The GDI Path 1082
Extended Pens 1083
Four Sample Programs 1088
  
Chapter 18    Metafiles 1097
The Old Metafile Format 1098
Simple Use of Memory Metafiles 1098
Storing Metafiles on Disk 1101
Old Metafiles and the Clipboard 1102
Enhanced Metafiles 1107
The Basic Procedure 1107
Looking Inside 1111
Metafiles and GDI Objects 1118
Metafiles and Bitmaps 1123
Enumerating the Metafile 1127
Embedding Images 1135
An Enhanced Metafile Viewer and Printer 1139
Displaying Accurate Metafile Images 1150
Scaling and Aspect Ratios 1161
Mapping Modes in Metafiles 1163
Mapping and Playing 1166
  
Section III    Advanced Topics
Chapter 19    The Multiple-Document Interface 1173
MDI Concepts 1173
The Elements of MDI 1173
MDI Support 1175
A Sample MDI Implementation 1177
Three Menus 1190
Program Initialization 1191
Creating the Children 1192
More Frame Window Message Processing 1193
The Child Document Windows 1194
Cleaning Up 1196
  
Chapter 20    Multitasking and Multithreading 1197
Modes of Multitasking 1198
Multitasking Under DOS? 1198
Nonpreemptive Multitasking 1198
PM and the Serialized Message Queue 1200
The Multithreading Solution 1200
Multithreaded Architecture 1201
Thread Hassles 1202
The Windows Advantage 1202
New! Improved! Now With Threads! 1203
Windows Multithreading 1204
Random Rectangles Revisited 1205
Any Problems? 1226
The Benefits of Sleep 1226
Thread Synchronization 1227
The Critical Section 1227
Event Signaling 1229
The BIGJOB1 Program 1230
The Event Object 1235
Thread Local Storage 1240
  
Chapter 21    Dynamic-Link Libraries 1243
Library Basics 1243
Library: One Word, Many Meanings 1244
A Simple DLL 1245
Shared Memory in DLLs 1251
The Library Entry and Exit Point 1258
The STRPROG Program 1259
Sharing Data Among STRPROG Instances 1264
Miscellaneous DLL Topics 1265
Dynamic Linking Without Imports 1265
Resource-Only Libraries 1266
  
Chapter 22    Sound and Music 1273
Windows and Multimedia 1273
Multimedia Hardware 1273
An API Overview 1274
Exploring MCI with TESTMCI 1275
MCITEXT and CD Audio 1280
Waveform Audio 1285
Sound and Waveforms 1285
Pulse Code Modulation 1286
The Sampling Rate 1287
The Sample Size 1287
Generating Sine Waves in Software 1288
A Digital Sound Recorder 1299
The MCI Alternative 1312
The MCI Command String Approach 1320
The Waveform Audio File Format 1325
Experimenting with Additive Synthesis 1326
Waking Up to Waveform Audio 1336
MIDI and Music 1345
The Workings of MIDI 1345
The Program Change 1347
The MIDI Channel 1347
MIDI Messages 1349
An Introduction to MIDI Sequencing 1351
Playing a MIDI Synthesizer from the PC Keyboard 1357
A MIDI Drum Machine 1375
The Multimedia time Functions 1399
RIFF File I/O 1402
  
Chapter 23    A Taste of the Internet 1405
Windows Sockets 1405
Sockets and TCP/IP 1406
Network Time Services 1406
The NETTIME Program 1407
WinInet and FTP 1421
Overview of the FTP API 1421
The Update Demo 1423


PREVIOUS PAGE


Visit Microsoft Press for more information on Programming Windows, Fifth Ed.


Top of Page


Last Updated: Saturday, July 7, 2001