Ok.. Done a bit of hunting... Seems what would be needed is to create a non-MDI window (I know this is possible, just not 'standard'). Then come the next trick. Do you want the window to be above everyone else, or only above everything when Mushclient is visible?
http://www.developerfusion.com/show/72/9/
At a guess, I would say using the 'frmFind.Show vbModeless, frmMain' example, where in this case frmMain would be the current world window would do the job, if you simply want it to be on top, when Mushclient is on top. Though I have no idea what effect this would have one a window that is 'supposed' to be moved outside the main window. You might have to use the first example from that page instead.
Hiding and unhiding it when you switch between worlds is an option that could be provided as well. In fact, "auto-hide", "hide when world is not visible", etc. could all be in a right click menu for the window. Same with something to bring up a dialog to set the pre-append text for a input window, or even if it 'has' such a window. Of course, there is the issue that saving those setting can't really be done. In a plugin, there is no way for Mushclient, currently, to write to the plugin with the settings, same with the main world.
http://www.codeproject.com/wtl/wtlsnap.asp
Gives an example of the auto-hide functionality, though most applications that use them tend to set the title bar size to about half normal and same with the font, so that when not in use, they are less annoying. For some uses this would be quite helpful to have. It also includes examples of docking code, though of course, since the idea is to make the window external, it needs to 'snap' to the outer edges of the client when room is available, not the inside.
I am asking on a C++ forum if there are any better examples around, but maybe these will help. Trying to find exactly what you want through google isn't precisely simple. lol But some combination of the snapping/floating functionality is probably what most people are looking for. The auto-hide and other tricks are just nice additions. Also, since MDI vs. SDI are behaviours, not specific states for a window, it should be possible to use the 'pin' for a different purpose, like 'pinning' the window to the client, so it behaves like another MDI, for those that don't want it floating next to the client. The existing purpose for it is sort of the same, except that it forces it in the open state. A different icon might be better for that, like an open book or something.
Anyway, thought I would try to help. I don't know what problems you are actually running into, but this is one time I really wish I did know C++, so I could work out a real example. :( |