[C++] PlusWnd to MsgPlus - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: [C++] PlusWnd to MsgPlus (/showthread.php?tid=97617) [C++] PlusWnd to MsgPlus by enoid on 05-17-2011 at 02:52 PM
I'm using a C++ DLL in which I create a PlusWnd and fill a ListViewControl with it as follows: code:Now I want to be able to control the PlusWnd with JScript from MsgPlus itself, but I can't seem to figure out how to return the PlusWnd Object to MsgPlus. I thought about sending the handle/ptr of the object, but I have no idea how to create a PlusWnd Object from it or use the handle/ptr at all. An other idea would be to create the PlusWnd with MsgPlus and pass the Object/ptr/handle to the DLL, but... same story. RE: [C++] PlusWnd to MsgPlus by Eljay on 05-17-2011 at 04:03 PM
quote: This is the simplest way to do it that I could find. js code: c++ code: 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 RE: [C++] PlusWnd to MsgPlus by CookieRevised on 05-17-2011 at 05:10 PM
And if you don't want to juggle with interfaces: you can create the window in the script, and send the window handle from the created window (instead of the object itself) to the DLL. And in the DLL you use the normal Windows APIs to manipulate the controls on the window. RE: [C++] PlusWnd to MsgPlus by enoid on 05-17-2011 at 05:15 PM Thanks for that Eljay! I think I'm just going the easy way For now I'm just filling the ListView and a few other basic things, so this method would suffice. Thanks again to the both of you! |