Fixed it!
- OnWndCommandBar_ShellEvent_MessageNotification always has to return something. Because we want all messages to be processed normally, we always return -1.
- You defined the element in your XML as "PhlChild" but you're referencing it as "PlhChild"! This is why RetrievePos always gives 0 for position and size.
- The place-holder needs to size with the window, so it needs anchoring.
- The place-holder should be the same size as the child window it holds in order to make the child size properly.
Attached is the script package with these fixes included. You still need to resize the other child window as well. Here's a tip: only resize the currently displayed child window, so store the current child in some global variable, size that one when receiving WM_SIZE and swap it when the child changes (don't forget to resize the new child after swapping!).