Shoutbox

ChatWnd and its child - PlusWnd - 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: ChatWnd and its child - PlusWnd (/showthread.php?tid=76783)

ChatWnd and its child - PlusWnd by nikyiu on 08-15-2007 at 08:13 AM

I want to create a PlusWnd which is always opposite with a ChatWnd, means their position can be adjusted at the same time (likes the playlist panel of winamp).

I've considered using setParent to make the PlusWnd be a child of the ChatWnd. But the PlusWnd even can't be shown if it is outside the border of the ChatWnd. How can I adjust the border of the ChatWnd and solve the problem?

Thank you very much!!

[Image: attachment.php?pid=842910]


RE: ChatWnd and its child - PlusWnd by vikke on 08-15-2007 at 08:28 AM

You cannot do it with SetParent then. You got to subclass the chat window, and look for movement/resize messages.

Or you can actually do it a quite bad way, using timers, moving the window to fit the chat window.


RE: ChatWnd and its child - PlusWnd by Matti on 08-15-2007 at 08:44 AM

You can't make a child window exceed it's parents boundaries. That's not what a child window is supposed to do. According to your screenshot, you want to make a search field. (which is a pretty nice idea! (y)) I recommend you to subclass the chat window and move your PlusWnd when you receive a WM_SIZE (and eventually a WM_SIZING) message and change the positions of your child window based on the new window rectangle.

This may be tricky, so if you need help with it, PM me with your e-mail address and I'll try to help you out. :) I'll have to do some research on how to subclass windows first myself too, but once we have a WM_SIZE message, it'll be easy to move the child window. :)