When creating a button you pass its parent. So normally you have a line like this that will add the button to the gui.
tgui::Button::Ptr button(gui);
The only difference is that instead of the gui you now just pass the child window.
tgui::ChildWindow::Ptr child(gui);
tgui::Button::Ptr button(*child);