TextEdit is a text editor, written in C++ to the raw Win32 API. It illustrates how to fit together all the myriad bits and pieces that make a robust Windows application a, well, robust Windows application.
TextEdit was originally written as the companion program to my book Programming Industrial Strength Windows (2000); I've occasionally fiddled with it in the years since then. It used to have a home on CodePlex; it has now moved to GitHub. RIP, CodePlex.
TextEdit demonstrates a number of things:
- There is no Save command. TextEdit follows Allan Cooper's unified file model, where all changes are committed directly to disk.
- Error handling and robustness.
- Persistence everywhere.
- Send as email.
- Installation and registration (under the hood, as it were).
- Utilizing the SendTo folder.
- The myriad ways of starting a Windows app and receiving arguments.
- The fine points of dialogs
- Simple HTML parsing and rendering.
- Snap window to edges of work area during move and resize.
I'm posting an entire book here, in the hope that this will provide sufficient documentation, and perhaps some additional value:
Programming Industrial Strength Windows
The logo was made with Microsoft Expression Design 2.
- Install Visual Studio (The free community edition is sufficient.)
- Install WiX
- Clone this project