What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Rich text format extract using Interop

Rich text format extract using Interop
Author: Message:
aztectrev
New Member
*


Posts: 8
– / Male / –
Joined: Jan 2010
O.P. Happy  Rich text format extract using Interop
I'm trying to get the RTF data out of a richeditcontrol. Couldn't find an easy way so i'm trying to use Interop.

so far i have:
code:
function OnWndMainEvent_CtrlClicked(PlusWnd, ControlId)
{
    if (ControlId == "BtnSend")
    {
        var SF_RTF = 0x2
        var SF_UNICODE = 0x10
        var WM_USER = 0x400
        var EM_STREAMOUT = (WM_USER + 74)
        var len = PlusWnd.GetControlText("CodeBox").length;
        var editStream = Interop.Allocate(24)
        editStream.WriteDWORD(0,0)
        editStream.WriteDWORD(8,0)
        editStream.WriteDWORD(16,Interop.GetCallbackPtr("EditStreamCallback"))
        var lResult = Interop.Call2("user32.dll", "SendMessageW", PlusWnd.GetControlHandle(ControlId), EM_STREAMOUT, SF_RTF || SF_UNICODE, editStream )
        Debug.Trace("result: " + lResult)
    }
}

function EditStreamCallback(dwCookie, lpBuff, cb, pcb)
{

}

I've probably done this all wrong so any help is appreciated.:|
01-04-2010 07:40 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Rich text format extract using Interop - by aztectrev on 01-04-2010 at 07:40 PM
RE: Rich text format extract using Interop - by matty on 01-26-2010 at 03:09 PM
RE: Rich text format extract using Interop - by aztectrev on 01-26-2010 at 04:18 PM
RE: Rich text format extract using Interop - by matty on 01-26-2010 at 04:25 PM
RE: Rich text format extract using Interop - by aztectrev on 01-26-2010 at 04:37 PM
RE: Rich text format extract using Interop - by matty on 01-26-2010 at 05:49 PM
RE: Rich text format extract using Interop - by aztectrev on 01-26-2010 at 06:22 PM
RE: Rich text format extract using Interop - by matty on 01-26-2010 at 06:36 PM
RE: Rich text format extract using Interop - by aztectrev on 01-26-2010 at 06:38 PM
RE: Rich text format extract using Interop - by matty on 01-26-2010 at 07:47 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On