Saturday, March 03, 2012

Something new in Win8 you might not have heard about... Win8 comes with a new rich edit control, RichEdit8

Murray Sargent: Math in Office - RichEdit 8.0 Preview

"There’s been a lot of buzz about the Windows 8 Consumer Preview and it is really exciting. One particularly exciting thing missing in the buzz is that Windows 8 contains a new RichEdit! Since the new version is now publically documented on MSDN, I can write about it. I found the public documentation by Binging for ITextRange2, one of the TOM2 interfaces introduced in RichEdit 6.0. As you can imagine, I’ve been dying to write about RichEdit 8 in Windows 8 for quite a while. There’s so much to say that there will be several posts on it.

In contrast, Windows 7 has RichEdit 4.1 which shipped with Windows XP SP1 back in 2003 (the Windows 7 version does have a few upgrades for new languages and security improvements). The new RichEdit is housed in the msftedit.dll. The older RichEdit 3.0 (riched20.dll) that also ships with Windows 8 is the same as that for previous versions of Windows aside from possible security fixes. We keep that riched20.dll around so that we don’t break really old applications that depend on it.

For developers, having the documentation for the TOM2 text object model, up-to-date messages, and the brand new WinRT text object model should be very useful. In previous posts I’ve described features added to RichEdit version 5 through 7 for Microsoft Office and people have commented that it’s kind of disheartening to read about these cool features and not be able to use them for lack of documentation. Well now they’re documented and all you need is Windows 8 to use them.

There are two key differences between the TOM2 interfaces that ship with RichEdit 8 and those in RichEdit 6 and 7: 1) ITextDocument2 is somewhat different and 2) ITextRange2::InsertImage() is new and is accessed through the last entry in the interface table. These changes might complicate things a bit if you want to use the TOM2 documentation with the Office 2007 or 2010 RichEdit. The RichEdit that ships with the next version of Office will have the same TOM2 interfaces as the Windows 8 RichEdit.


If you find problems with RichEdit 8 or with the documentation, please let me know. More posts to come, e.g., on the nested table model, DWrite/D2D operation, native spell checking and autocorrect, touch, native image support, accessibility …! This is the biggest RichEdit upgrade ever." [GD:Emphasis added]

Ah, the memories of riched20.dll...

Anyway, I thought this tidbit interesting and one not covered all that much yet.

No comments: