quote:
Originally posted by Matti
- Place the RetrievePos function of SmokingCookie somewhere in your script.
- Create your window and child window as you normally would. After creation, register WM_SIZE on your parent.
js code:
WndCommandBar_Shell.RegisterMessageNotification(/* WM_SIZE */ 0x5, true);
- Create a handler for the message notification event. Check the Message parameter and when you got WM_SIZE, you can resize the child window like so:
js code:
// Get the place-holder's position
var posChild = RetrievePos(WndCommandBar_Shell, "PlhChild");
// SetWindowPos flags
var flagsSWP = /* SWP_NOACTIVATE */ 0x10 | /* SWP_NOMOVE */ 0x2;
// Position the child
Interop.Call("user32", "SetWindowPos", WndCommandBar_CMain.Handle, 0, 0, 0, posChild.Width, posChild.Height, flagsSWP);
// Done!
I've done all that, and the parent/child windows are loaded, but as soon as I resize the window, the child disappears. It leaves just an empty parent window...