Hacker News new | ask | show | jobs
by lockhouse 1021 days ago
The parser and renderer is a pre-existing RichTextEdit widget. Add menus and save, open, and print functionality and you are over 90% of the way to a WordPad clone.
3 comments

Microsoft used to distribute source code for a WordPad sample app with Visual Studio.

https://github.com/microsoft/VCSamples/tree/master/VC2010Sam...

Opening and saving as .docx would seem to be the only hard part.

I'm assuming that's not built into the widget or into Windows. Is there an open-source drop-in docx<->rtf library out there?

It’s a pre built widget because Microsoft wrote it for WordPad though.
It’s actually likely to be the opposite. WordPad could be a test application for the RichTextEdit widget.
No. The RichText control was written for the Win95/Exchange email client.

Since there was now a RichText control that supported RTF in Windows, the Windows group could write a thin wrapper around the RichText control and replace Microsoft Write with Microsoft WordPad.

Support for Microsoft Word file formats came later once the Word group took over responsibility for the RichText control code.

Man… the backstory behind anything in windows is always some insane mishmash of backwards compatibility, repurposed tooling, and other assorted insanity.