Shoutbox

Set the owner of a popup window - 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: Set the owner of a popup window (/showthread.php?tid=85684)

Set the owner of a popup window by NeoBlackBird on 08-31-2008 at 01:03 AM

Hello, im french, so scuse me for my bad english.

I want to create a popup window with XML file and set the owner of this window.
In C++ we can do that :
hWindow = CreateDialog(hInstance, (LPCTSTR)IDD_WINID, hParent, (DLGPROC)procWindow);
And the hParent is the handle of the owner of the new window.
How can i do it with XML file or js script ?

Thank you for ur help :)


RE: Set the owner of a popup window by Felu on 08-31-2008 at 04:34 AM

Do you mean to set owner of a Plus! Window?

You could either use MsgPlus.CreateChildWnd(Check Scripting Documentation) or SetParent API.

code:
Interop.Call("User32.dll", "SetParent", ChildWnd.Handle, ParentWnd.Handle); //ParentWnd.Handle is the handle of the Parent window

RE: Set the owner of a popup window by NeoBlackBird on 08-31-2008 at 04:50 AM

Hello,

I have already tryed this.
My child is a popup window, and if i create it with MsgPlus.CreateChildWnd, she don't stay at the top when the parent has the focus.
The SetParent API don't works for a window who has been already created and if the desktop is her first parent.
If i use it, the program crash.
I want to create a child window popup who stay at the top of her parent window ( like windows messagebox ).

Thanks for ur help.