What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [C++] PlusWnd to MsgPlus

[C++] PlusWnd to MsgPlus
Author: Message:
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [C++] PlusWnd to MsgPlus
quote:
Originally posted by enoid
An other idea would be to create the PlusWnd with MsgPlus and pass the Object/ptr/handle to the DLL, but... same story.

This is the simplest way to do it that I could find.

Javascript code:
    var TestWnd = MsgPlus.CreateWnd("TestWnd.xml", "TestWnd");
    Interop.Call(DllPath, "TestWindow", TestWnd);

C++ code:
void __stdcall TestWindow(IDispatchPtr dispPlusWnd)
{
    _IMPPlusWndPtr pPlusWnd;
    acquireInterfacePtr(dispPlusWnd, pPlusWnd);
 
    pPlusWnd->SetControlText("EditTest", "Hello, World!");
}


The other way should be possible, but I don't think you can return IDispatch pointers directly with Interop.Call. You should be able to create a DataBloc and write the IDispatch* to that then use DataBloc.ReadInterfacePtr to get the object back, but the above way is much easier :P
05-17-2011 04:03 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[C++] PlusWnd to MsgPlus - by enoid on 05-17-2011 at 02:52 PM
RE: [C++] PlusWnd to MsgPlus - by Eljay on 05-17-2011 at 04:03 PM
RE: [C++] PlusWnd to MsgPlus - by CookieRevised on 05-17-2011 at 05:10 PM
RE: [C++] PlusWnd to MsgPlus - by enoid on 05-17-2011 at 05:15 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