Git Product home page Git Product logo

wordpad's Introduction

WordPad

This is a fork of the Microsoft WordPad sources as found in the archived repository Microsoft/VCSamples (under :/VC2010Samples/MFC/ole/wordpad), published under the MIT license.

The version history is unclear, but it seems like Windows forked WordPad away from MFC at MFC 3.2 for inclusion in Windows 95. This version appears to be functionally identical to the Windows 95 version, but with added support for paragraph spacing and page breaks. Source diffs with MFC 4.0 also show minor changes like added support for 64-bit Windows, and the use of "secure" _s C functions.

The source code for the Write and Word converters is not included, but the Write converter is included as a binary. The Word converter is not included, likely due to a RCE vulnerability.

What Next?

This is a slightly better WordPad than the stock Windows 95 version, so I'll backport it to an older Visual C++ so that it can be built for older Windows. Backporting it to Windows 3.11 (with Win32s) is also in the plans. Improvements are welcome, though there will also be a branch with a minimally-modified original version (in the same spirit as Microsoft/winfile).

wordpad's People

Contributors

drfrankenstein avatar

Stargazers

OrthodoxWin32 avatar  avatar  avatar Lauri Ojansivu avatar Kelvin Shadewing avatar

Watchers

 avatar James Cloos avatar

Forkers

xet7

wordpad's Issues

Build on old VC++

We need to ensure we can build the app on an old version of VC++ (likely version 4) so that we can target Windows 95 and Windows 3.1x.

  • Alias/polyfill RichEdit >= 2 structures
    • CHARFORMAT2
    • PARAFORMAT2
  • Polyfill Win64 types
    • LONG_PTR
    • UINT_PTR
    • DWORD_PTR
  • Polyfill _s functions?
  • Polyfill ENSURE
  • Polyfill T2CA

...probably more yet to discover

De-threadify document conversion on Win3

Invoking a converter on a document (such as opening a .wri) hangs on Windows 3.1x because CConverter::Open attempts to launch the conversion in a thread:

AfxBeginThread(ConverterThread, this, THREAD_PRIORITY_NORMAL, 0, 0, &sa);

We need to detect Win3 and run it synchronously in that case, like CWordPadApp::InitInstance does when attempting to register file associations:

WordPad/wordpad.cpp

Lines 269 to 274 in 95303c0

#ifndef _UNICODE
if (m_bWin31) // no threads on Win32s
UpdateRegistry();
else
#endif
AfxBeginThread(DoRegistry, this, THREAD_PRIORITY_IDLE);

This might involve some work because of the usual message passing between the converter thread and the main thread.

Add CI

Add GitHub actions that will attempt to build the application and generate artifacts.

Fix the margins bug on Win3

After printing or switching printers on Win3, it appears that the document margins get zeroed out, or at least left in a broken state.

wordpad.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.