Primitive custom Richedit control

Post your working scripts, libraries and tools for AHK v1.1 and older
burque505
Posts: 1732
Joined: 22 Jan 2017, 19:37

Primitive custom Richedit control

18 Apr 2018, 20:46

This is a work in progress using code by just me, DigiDon and tips from jeeswg. My hope is to get a version of just me's "Poor Man's Rich Edit" provided with Class_Richedit to accept pasting/inserting images [EDIT 4-21-2018 - Done]. This little script can accepted pasted images and simple typed text, but that's it.
EDIT: To my chagrin, RTF can only be pasted if it's first captured to the clipboard by the code below the main script. Just copying and pasting RTF doesn't seem to work (yet).
EDIT: This is based on code from just me's TOM tutorial.
EDIT: The errors described in the first edit were due to corrupted source RTF. Copying from just about anywhere seems to work (including images from browsers). I'm leaving the other scripts in just in case someone finds them useful. Also, I now have a version of "Poor Man's Rich Edit" that opens rich text files, and accepts pasted rich text, on Win7 64-bit. I don't have Win10 available at the moment to test "Poor Man's Rich Edit" with a mod, but I believe the newer version of "msftedit.dll" provided in Win8.1+ may obviate the need for the mod I've made. If there is any interest, I'll post the modded "Poor Man's Rich Edit" and supporting #Includes. I have, though, added a screenshot.

RE1.1.ahk:
Spoiler
Version 3.0, context menu added, redundant code removed.
Spoiler
Here's RichEdit OleCallback.ahk, so you don't have to spelunk for it.
Here's an archive of the code:
The attachment RichEditTests.7z is no longer available
If you get RTF into the clipboard with this, it can paste onto the script above.
Spoiler
This requires, in turn, RTFtoClipCallback.ahk:
Spoiler
That's a lot of hoops to jump through.

And an animated GIF of its function, impoverished though it may be:
RE.gif
RE.gif (20.12 KiB) Viewed 915 times
Modded Poor Man's Rich Text Edit screenshot:

Regards,
burque505
pmrte.png
pmrte.png (53.24 KiB) Viewed 853 times

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: TAC109 and 123 guests