Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Programming Windows 3.1: Charles Petzold

Programming Windows 3.1: Charles Petzold

Scheduled Pinned Locked Moved The Lounge
c++comgraphicshardwaredata-structures
28 Posts 18 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R raddevus

    I was writing a response to a thread and talking about one of the first programming books I ever read (after C++ For Dummies), Programming Windows 3.1 by Charles Petzold. I discovered you can read the entire book at archive.org: Programming Windows 3.1 : Petzold, Charles, 1953- : Free Download, Borrow, and Streaming : Internet Archive[^] Before you start reading you should know about the hardware requirements as listed by the author: To best run Windows and the development tools, you need the following hardware: ■ An IBM personal computer (or compatible) based on the Intel 80386 microprocessor with a hard disk and 4 megabytes (MB) of memory running MS-DOS 3-3 or later. ■ A graphics display and video board, preferably compatible with the IBM VGA (Video Graphics Array) or better. ■ A mouse. Although a mouse is generally optional for most Windows programs, some of the programs in this book require one. Not everyone had a mouse. :laugh: It's such a stroll down memory lane. Also, he mentions:

    from Preface

    The chapter on text and fonts focuses on another Windows 3.1 enhancement — the introduction of the scalable outline font technology known as TrueType.

    Because you've probably never heard of TrueType fonts (TTF). :rolleyes: #### UPDATE : Get Source Code ####### If you want the source code for the examples in the book you can download them via this link: https://charlespetzold.com/src/ProgWin31.zip[^]

    T Offline
    T Offline
    TNCaver
    wrote on last edited by
    #19

    raddevus wrote:

    Because you've probably never heard of TrueType fonts

    Wait, are TrueType fonts no longer a thing?

    There are no solutions, only trade-offs.
       - Thomas Sowell

    A day can really slip by when you're deliberately avoiding what you're supposed to do.
       - Calvin (Bill Watterson, Calvin & Hobbes)

    1 Reply Last reply
    0
    • J Jeremy Falcon

      Fancy, seeing that book makes me wonder whatever happened to Tom Archer. He be gone.

      Jeremy Falcon

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #20

      Which Tom Archer do you mean? Google returns about 10,000 Tom Archers.

      The difficult we do right away... ...the impossible takes slightly longer.

      J 1 Reply Last reply
      0
      • Richard Andrew x64R Richard Andrew x64

        Which Tom Archer do you mean? Google returns about 10,000 Tom Archers.

        The difficult we do right away... ...the impossible takes slightly longer.

        J Offline
        J Offline
        Jeremy Falcon
        wrote on last edited by
        #21

        This [Tom Archer](https://www.amazon.com/Inside-C-Second-Tom-Archer-dp-0735616485/dp/0735616485/ref=dp\_ob\_title\_bk). He used to be an active CPian and we were good buddies. Been years since I last chatted with him though.

        Jeremy Falcon

        1 Reply Last reply
        0
        • B BernardIE5317

          That book started me on my so called career as a programmer. After reading his implementation of a hex editor I thought long and hard for 15 minutes and decided I could do better. I then spent the next 4 years implementing the world's then only user configurable binary file editor aka "FileRay". A copy can be found on the Wayback machine. By the way if you need such an editor I highly recommend the only one of its kind today id est "010 Editor" by Sweetscape Software. It is a pleasure to utilize. "If you try to fail, and succeed, which have you done?" - George Carlin

          D Offline
          D Offline
          den2k88
          wrote on last edited by
          #22

          Well mate you just suggested me a piece of software I always looked for. Kudos to you!

          GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X The shortest horror story: On Error Resume Next

          1 Reply Last reply
          0
          • R raddevus

            I was writing a response to a thread and talking about one of the first programming books I ever read (after C++ For Dummies), Programming Windows 3.1 by Charles Petzold. I discovered you can read the entire book at archive.org: Programming Windows 3.1 : Petzold, Charles, 1953- : Free Download, Borrow, and Streaming : Internet Archive[^] Before you start reading you should know about the hardware requirements as listed by the author: To best run Windows and the development tools, you need the following hardware: ■ An IBM personal computer (or compatible) based on the Intel 80386 microprocessor with a hard disk and 4 megabytes (MB) of memory running MS-DOS 3-3 or later. ■ A graphics display and video board, preferably compatible with the IBM VGA (Video Graphics Array) or better. ■ A mouse. Although a mouse is generally optional for most Windows programs, some of the programs in this book require one. Not everyone had a mouse. :laugh: It's such a stroll down memory lane. Also, he mentions:

            from Preface

            The chapter on text and fonts focuses on another Windows 3.1 enhancement — the introduction of the scalable outline font technology known as TrueType.

            Because you've probably never heard of TrueType fonts (TTF). :rolleyes: #### UPDATE : Get Source Code ####### If you want the source code for the examples in the book you can download them via this link: https://charlespetzold.com/src/ProgWin31.zip[^]

            D Offline
            D Offline
            den2k88
            wrote on last edited by
            #23

            Memories of learning programming with GWBASIC on DOS 4.0. It was already OLD when I started (it was the year 1998) but I could use a dismissed Compaq 486 laptop as my test bench and I already knew how to set up a machine with any DOS and Windows system (learnt way back in 1995, I was 7) so I wasn't new to the command line and I couldn't mess the home computer. In 2002 my dad got me VisualStudio 6 and a very good VB6 book, which actually got me into "serious" programming. Boy did I suck. My only software wrote as a self-taught programmer did work but was everything a program shouldn't be. Fortune wanted the language we developed in high school from the 3rd year was exactly VB6 and the teacher was awesome in teaching the basics (from flow chart to pseudocode, troubleshooting technicques and formal verification). I also later learnt she also taught my first Computer Science college professor, who was awesome as well. Sorry for rambling, it was just a trip down memory lane.

            GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X The shortest horror story: On Error Resume Next

            D 1 Reply Last reply
            0
            • R raddevus

              I was writing a response to a thread and talking about one of the first programming books I ever read (after C++ For Dummies), Programming Windows 3.1 by Charles Petzold. I discovered you can read the entire book at archive.org: Programming Windows 3.1 : Petzold, Charles, 1953- : Free Download, Borrow, and Streaming : Internet Archive[^] Before you start reading you should know about the hardware requirements as listed by the author: To best run Windows and the development tools, you need the following hardware: ■ An IBM personal computer (or compatible) based on the Intel 80386 microprocessor with a hard disk and 4 megabytes (MB) of memory running MS-DOS 3-3 or later. ■ A graphics display and video board, preferably compatible with the IBM VGA (Video Graphics Array) or better. ■ A mouse. Although a mouse is generally optional for most Windows programs, some of the programs in this book require one. Not everyone had a mouse. :laugh: It's such a stroll down memory lane. Also, he mentions:

              from Preface

              The chapter on text and fonts focuses on another Windows 3.1 enhancement — the introduction of the scalable outline font technology known as TrueType.

              Because you've probably never heard of TrueType fonts (TTF). :rolleyes: #### UPDATE : Get Source Code ####### If you want the source code for the examples in the book you can download them via this link: https://charlespetzold.com/src/ProgWin31.zip[^]

              T Offline
              T Offline
              theoldfool
              wrote on last edited by
              #24

              Yup, had that book. Dipped my toes in the Windows development world. 386SX system, Microsoft C on diskettes. Had some Microsoft book on graphics for DOS (memory vague here). First project was creating a "bird" (2 triangles) flying around the screen bouncing of the 4 edges. Proud, I was. First comment was something like: "that looks like crap!". Truth often hurts. Real project was on a fabricated, vehicle mounted "laptop" with mono screen. No flying birds.

              >64 It’s weird being the same age as old people. Live every day like it is your last; one day, it will be.

              R 1 Reply Last reply
              0
              • D Daniel Pfeffer

                I still have my dead-tree version of this book and of its sequel, Programming Windows 95. But then, I'm a packrat (aka hoarder).

                Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                D Offline
                D Offline
                dandy72
                wrote on last edited by
                #25

                I threw out a number of old books some years ago (unrelated: my local library doesn't accept anything older than 5 years, WTF) but I made a point of keeping that one.

                1 Reply Last reply
                0
                • D den2k88

                  Memories of learning programming with GWBASIC on DOS 4.0. It was already OLD when I started (it was the year 1998) but I could use a dismissed Compaq 486 laptop as my test bench and I already knew how to set up a machine with any DOS and Windows system (learnt way back in 1995, I was 7) so I wasn't new to the command line and I couldn't mess the home computer. In 2002 my dad got me VisualStudio 6 and a very good VB6 book, which actually got me into "serious" programming. Boy did I suck. My only software wrote as a self-taught programmer did work but was everything a program shouldn't be. Fortune wanted the language we developed in high school from the 3rd year was exactly VB6 and the teacher was awesome in teaching the basics (from flow chart to pseudocode, troubleshooting technicques and formal verification). I also later learnt she also taught my first Computer Science college professor, who was awesome as well. Sorry for rambling, it was just a trip down memory lane.

                  GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X The shortest horror story: On Error Resume Next

                  D Offline
                  D Offline
                  dandy72
                  wrote on last edited by
                  #26

                  den2k88 wrote:

                  Boy did I suck. My only software wrote as a self-taught programmer did work but was everything a program shouldn't be.

                  Some would argue this is exactly where VB leads beginners. I personally probably haven't done enough VB to make that judgement call myself, but it *is* the comment that keeps coming back - that it teaches bad habits that are then hard to break out of.

                  D 1 Reply Last reply
                  0
                  • T theoldfool

                    Yup, had that book. Dipped my toes in the Windows development world. 386SX system, Microsoft C on diskettes. Had some Microsoft book on graphics for DOS (memory vague here). First project was creating a "bird" (2 triangles) flying around the screen bouncing of the 4 edges. Proud, I was. First comment was something like: "that looks like crap!". Truth often hurts. Real project was on a fabricated, vehicle mounted "laptop" with mono screen. No flying birds.

                    >64 It’s weird being the same age as old people. Live every day like it is your last; one day, it will be.

                    R Online
                    R Online
                    raddevus
                    wrote on last edited by
                    #27

                    386SX -- 32-bit chip (internally) with 16-bit bus access. :thumbsup:

                    1 Reply Last reply
                    0
                    • D dandy72

                      den2k88 wrote:

                      Boy did I suck. My only software wrote as a self-taught programmer did work but was everything a program shouldn't be.

                      Some would argue this is exactly where VB leads beginners. I personally probably haven't done enough VB to make that judgement call myself, but it *is* the comment that keeps coming back - that it teaches bad habits that are then hard to break out of.

                      D Offline
                      D Offline
                      den2k88
                      wrote on last edited by
                      #28

                      Oh no it wasn't anything inherent to VB, writing 1000 lines undocumented functions can be done (and I saw it multiple times by so-called professionals) in any language. I worked a lot on VB6 in my first company and honestly I liked it. It lacked some features and had a few quirks but for its role it's really comfortable. It gives a lot less bad habits than its strongest current competitor, which in my opinion is Python. As a quick GUI to call library functions it's just unbeatable, but take my opinion with a massive grain of salt - if some crazy mofo in MS will ever release a VB7 I'd jump on it in .3 nanoseconds.

                      GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X The shortest horror story: On Error Resume Next

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups