Some time back I had an idea.. Why not design a program to be a companion to Mushclient, which would let you design the layout of a window, save that as XML and then have a plugin parse that to reproduce the GUI you just made. There where too "critical" problems doing this. The first is that Mushclient scripts/plugins can't respond to events from such a control. Basically, if you made a window with a button, the button would never do anything. The second problem was a designer. The code of impliment one seemed to be buried so far down in the bowels of MS' "Why do you need to know this?" docs that it would never see the light of day.
The solution to the first problem turns out to be an ATL bridge. I sent Nick a link to it, but so far I have no idea if he has looked into it much or figured out how to make it work. Basically, it would give Mushclient a new script function, which would let you say: utils.connect("MyButton", "Button1"), where "MyButton" is the event and "Button1" would be an function/subroutine in the script/plugin. Problem solved and it would work for even existing controls, like the Winamp control dll that was frustratingly unable to tell Mushclient when the song changed to a new one.
The other problem is solved with:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/vcrefiaxwinambientdispatchput_usermode.asp
That's right.. The secret of the ages revieled. Or at least one that is damn hard to find. The "key" to being able to change properties that are normally locked and move controls around a windows is "iaxwinambientdispatchput_usermode". This can "probably" be accessed within some scripts, though probably not VB. But as usual the exact method to correctly impliment it is obscure in the MS documentation. Gosh, would it have hurt to include %$@$@#@$ example code once in a while guys? lol
But, point is it "should" be possible to use this and the bridge together to impliment a designer plugin. Just finding it is about the limit of my skill in this matter though. :p Figured maybe someone else with more of a clue how the heck to make some of this stuff work could try fiddling with it.
The solution to the first problem turns out to be an ATL bridge. I sent Nick a link to it, but so far I have no idea if he has looked into it much or figured out how to make it work. Basically, it would give Mushclient a new script function, which would let you say: utils.connect("MyButton", "Button1"), where "MyButton" is the event and "Button1" would be an function/subroutine in the script/plugin. Problem solved and it would work for even existing controls, like the Winamp control dll that was frustratingly unable to tell Mushclient when the song changed to a new one.
The other problem is solved with:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/vcrefiaxwinambientdispatchput_usermode.asp
That's right.. The secret of the ages revieled. Or at least one that is damn hard to find. The "key" to being able to change properties that are normally locked and move controls around a windows is "iaxwinambientdispatchput_usermode". This can "probably" be accessed within some scripts, though probably not VB. But as usual the exact method to correctly impliment it is obscure in the MS documentation. Gosh, would it have hurt to include %$@$@#@$ example code once in a while guys? lol
But, point is it "should" be possible to use this and the bridge together to impliment a designer plugin. Just finding it is about the limit of my skill in this matter though. :p Figured maybe someone else with more of a clue how the heck to make some of this stuff work could try fiddling with it.