Programming Windows (Fifth Edition)





Table of contents

  1. General
    1. Introduction
    2. News
    3. Testing configuration
    4. Statistics
    5. Installation
    6. Wine notes
    7. Winelib notes
  2. Test Results

1. General

1.1. Introduction

Title Programming Windows (Fifth Edition)
ISBN 1-57231-995-X
Author Charles Petzold
URL Fifth edition's site
Fifth edition's Errata
Buying online Barnes & Noble
Buy.com

Get the complete testing kit, including these pages, from:
PrgWin98-0.2.1.tar.gz
(it's released under the X11 license)

1.2. News

1.3. Testing configuration

The tests have been performed on my Linux box:

I sometimes say that the values I get are different from what I get on Windows. In that case the reference is a Windows 98 laptop running in 1024x768x24. Of course I ignored differences related to the resolution.

1.4. Statistics

148 examples
39 have been tested (26%)
12 have Wine errors (31% of tested) 11 have warnings (28% of tested)
for a total of 15 errors for a total of 18 warnings
2 have Winelib errors (1% of total) 8 have warnings (5% of total)
for a total of 2 errors for a total of 8 warnings
145 executables 144 Winelib executables (99%)
3 libraries 3 Winelib libraries (100%)
170 C files 169 compiled (99%)
1 C++ files 1 compiled (100%)
53 RC files 53 compiled (100%)

As you can see progress has been made since the last release, especially concerning Winelib.
148 examples
19 have been tested (13%)
4 have Wine errors (21% of tested) 9 have warnings (47% of tested)
for a total of 4 errors for a total of 15 warnings
90 have WineLib errors (61% of total) 12 have warnings (8% of total)
for a total of 104 errors for a total of 12 warnings
145 executables 59 WineLib executables (41%)
3 libraries 0 WineLib libraries (0%)
170 C files 111 compiled (65%)
1 C++ files 1 compiled (100%)
53 RC files 0 compiled (0%)

1.5. Installation

To install this testing kit follow these steps:

 #Copy the contents of the CD to some directory.
 mkdir PrgWin98
 cd PrgWin98
 cp -r /cdrom/Chap* .
 # The directories will be read-only, make them read-write
 chmod -R u+w *
 # Run winemaker as follows
 winemaker --nogenerated-files .
 # Uncompress the contents of the testing kit. Adapt to the version you got
 tar xvfz ~/PrgWin98-0.2.1.tar.gz
 # Then complete the setup.
 ./generate --setup
 # And prepare the compilation
 ./configure --with-wine=$HOME/wine
 # Make sure you have set up the environment correctly for using Wine
 # Then recompile everything, keeping a log
 make 2>&1 | tee make.log
 

To compile and perform the tests with Wine you will need to set up the Wine environment (LD_LIBRARY_PATH and PATH) as you usually do when you want to use Wine.

1.6. Wine notes

We pretty much find the same problems as for 'Programming Windows 95' so the best is to see the relevant section from the web site.

1.7. Winelib notes

Most Winelib errors of the previous release (include case issues, use of afxres.h instead of winres.h) were solved by Winemaker. The rest (source files located in weird locations, extra libraries) was taken care of by adjusting the winemaker generated makefiles.

2. Test Results

  1. Chapter 1 - Getting Started
    1. HelloMsg Wine: 1 warning
  2. Chapter 2 - An Introduction to Unicode
    1. ScrnSize Wine: 1 warning
  3. Chapter 3 - Windows and Messages
    1. HelloWin
  4. Chapter 4 - An Exercise in Text Output
    1. SysMets1 Wine: 1 error, 3 warnings
    2. SysMets2
    3. SysMets3
  5. Chapter 5 - Basic Drawing
    1. AltWind
    2. Bezier
    3. Clover Wine: 1 error Winelib: 1 error
    4. DevCaps1 Wine: 3 warnings
    5. LineDemo Wine: 1 error
    6. RandRect
    7. SineWave Wine: 1 error
    8. WhatSize Wine: 1 warning
  6. Chapter 6 - The Keyboard
    1. KeyView1 Wine: 2 errors, 3 warnings
    2. KeyView2
    3. StokFont Wine: 1 warning
    4. SysMets4
    5. Typer
  7. Chapter 7 - The Mouse
    1. BlokOut1
    2. BlokOut2 Wine: 1 error
    3. Checker1 Wine: 1 error
    4. Checker2
    5. Checker3
    6. Checker4
    7. Connect
    8. SysMets
  8. Chapter 8 - The Timer
    1. Beeper1
    2. Beeper2
    3. Clock Wine: 1 error
    4. DigClock
    5. WhatClr Wine: 2 errors
  9. Chapter 9 - Child Window Controls
    1. BtnLook Wine: 1 error
    2. Colors1 Wine: 2 errors, 2 warnings
    3. Environ
    4. OwnDraw
    5. PopPad1 Wine: 1 error, 1 warning
    6. head Wine: 1 warning
  10. Chapter 10 - Menus and Other Resources
    1. IconDemo
    2. MenuDemo
    3. NoPopups
    4. PoePoem
    5. PoorMenu
    6. PopMenu
    7. PopPad2
  11. Chapter 11 - Dialog Boxes
    1. About1
    2. About2
    3. About3
    4. Colors2
    5. Colors3
    6. HexCalc
    7. PopPad3
  12. Chapter 12 - The Clipboard
    1. ClipText
    2. ClipView
  13. Chapter 13 - Using the Printer
    1. DevCaps2
    2. FormFeed
    3. PopPad
    4. Print1
    5. Print2
    6. Print3
  14. Chapter 14 - Bitmaps and Bitblts
    1. BitBlt
    2. BitMask
    3. Blowup
    4. Bounce
    5. Bricks1
    6. Bricks2
    7. Bricks3
    8. GrafMenu
    9. HelloBit
    10. Scramble
    11. Sketch
    12. Stretch
  15. Chapter 15 - The Device-Independent Bitmap
    1. Apollo11
    2. DibConv
    3. DibHeads
    4. DibSect Winelib: 1 warning
    5. SeqDisp
    6. ShowDib1
    7. ShowDib2
  16. Chapter 16 - The Palette Manager
    1. AllColor
    2. Bounce
    3. Dibble Winelib: 1 warning
    4. Fader
    5. Grays1
    6. Grays2
    7. Grays3
    8. Pipes
    9. ShowDib3
    10. ShowDib4
    11. ShowDib5
    12. ShowDib6
    13. ShowDib7
    14. ShowDib8 Winelib: 1 warning
    15. SysPal1
    16. SysPal2
    17. SysPal3
    18. Tunnel
  17. Chapter 17 - Text and Fonts
    1. ChosFont
    2. EZTest
    3. EndJoin
    4. FontClip
    5. FontFill
    6. FontOut1
    7. FontOut2
    8. FontRot
    9. Justify1
    10. Justify2
    11. PickFont
    12. Unichars
  18. Chapter 18 - Metafiles
    1. Emf1
    2. Emf10
    3. Emf11
    4. Emf12
    5. Emf13
    6. Emf2 Wine: 1 warning
    7. Emf3
    8. Emf4
    9. Emf5 Winelib: 1 warning
    10. Emf6 Winelib: 1 warning
    11. Emf7 Winelib: 1 warning
    12. Emf8
    13. Emf9
    14. EmfView
    15. Metafile
  19. Chapter 19 - The Multiple-Document Interface
    1. MDIDemo
  20. Chapter 20 - Multitasking and Multithreading
    1. BigJob1
    2. BigJob2
    3. Multi1
    4. Multi2
    5. RndRctMT
  21. Chapter 21 - Dynamic-Link Libraries
    1. BitLib
    2. EdrLib
    3. EdrTest
    4. ShowBit
    5. StrLib Winelib: 1 warning
    6. StrProg
  22. Chapter 22 - Sound and Music
    1. AddSynth
    2. BachTocc
    3. Drum
    4. KBMidi
    5. Record1
    6. Record2
    7. Record3
    8. SineWave
    9. TestMci
    10. WakeUp
  23. Chapter 23 - A Taste of the Internet
    1. NetTime Winelib: 1 error
    2. UpdDemo Winelib: 1 warning

fgouget@free.fr This page is hosted for free by Free.fr