Extending RichTextBox's LoadFile/SaveFile functions
-
I was pretty disappointed when I first looked over the RichTextbox component and seen that they didn't include UTF-8 as one of the Format Options (since it is available in V 3 of the control). What I'd like to do is extend the loadfile/save file function by creating a class or module that contructs the RichEdit's EditCallback function so that I can then use SendMessage to Streamin and Streamout the data. I've done this before in VB6 -- but I can't seem to get the code to work in vb.net because I don't understand how to generate the EDITSTREAM structure. I'd like to pass a filestream handle into the Callback, but I can't figure out how to create the EDITSTREAM structure so that dwCookie will allow the handler and then how to use that handler in the Callback. I'm wonder if anyone here has done something like this (or maybe has C# or C++ code that they wouldn't mind sharing -- or better yet, coverting) or maybe knows of another way that I could load UTF8 data into a RichTextbox. Thanks