by throwaway_75369 · 3y ago · 0 comments
This let you do all kinds of things like embed other types of controls (like canvases or images from Paint, or Excel tables) inside your document, and WordPad's UI would jump through all the hoops to update and transform into the embedded application's UI when that control gained focus. This made it a pretty useful testing app when I was interning at MS and working on embeddable Inking surfaces for Tablet PC. (Yes, I'm a dinosaur)
At my secondary school, a long time ago now, they used PCs from educational vendor Research Machines (RM). These ran a locked down version of the Windows 3.11 Program Manager which didn't allow you to start any unapproved programs. I discovered you could embed EXEs from a floppy disk as OLE objects in a Write document and then start them from within Write by double clicking. In this manner, I could bring my LibertyBasic programs in from home and run them on the school's machines :-).
"The WordPad sample demonstrates how to implement an application that imitates the functionality of WordPad, including the user interface elements and some of the capabilities."
I should have known it wasn't the real Win95 WordPad source code since this version is written using MFC and C++.
C++ was not an approved programming language for Win95 components in its quest to run on Brad Silverberg's (Win95 manager) mom's 4MB RAM PC.
from https://web.archive.org/web/20070127011040/http://blogs.msdn...: "...RichEdit 1.0 was wrapped in MFC to produce WordPad as an example of how MFC could be used for text processing. This was shipped with Windows 95 as mentioned in the previous post."
More RichEdit history: https://web.archive.org/web/20070306114503/http://blogs.msdn...
Plenty of Windows 95 components were written in C++, including pretty much everything that dealt with OLE. WinNT also used C++ for the graphics layer.
Lots of MS groups were using C++ before Win95, including the Exchange group.
Windows for Workgroups 3.1+ included C++ code.
I recall that in the initial Win95 group meeting, C++ wasn't allowed. I moved to another team, so I don't know if that restriction was relaxed or not and/or when they allowed C++.
The email client included with Win95 wasn't allowed to use C++, including the RichEdit windows control, which had to use C for OLE code - not many other codebases could boast about that - no one signs up for that sort of masochism by choice.
Of course most of the time it isn't very practical (and WordPad chokes at anything above a handful of MB) since you're making a bad archive file (using the default .rtf format will encode the binary data in hex which will actually increase file size), but i always liked how general the idea was.
(also it isn't limited to WordPad but to anything that uses OLE - e.g. you could do the same with Delphi which has a "OLE object" control that can embed any OLE object and the object becomes part of the executable - so you could, say, throw a PDF file in a package OLE object in a form and when the user doubleclicks it the control opens the default PDF viewer)
[0] "somehow" here includes said malware taking advantage of unrelated security holes but this is true for everything, not just OLE