It's all about storing references to all child-objects/components inside the parent-objects/container, having a well thought out overall structure/system, and first and foremost: Writing a ton of scripts to make the whole thing atleast somewhat managable. Did something like this, thought it would be fun. It wasn't.
Nevertheless, a few tips/suggestions:
Let every component draw itself as surface in the draw event and use a user_event for the code where the surface gets created/recreated(!). This is the "repaint" event, which would be called to create the initial surface, when the surface would be destroyed through something like minimizing the game window, and when the parentcontainer says so. Whenever one component would invalidate the draw state of itself it would tell its parentobject, which would then iterate through all childcomponents and call their repaint-event in order to revalidate the whole container/component group.
Let every component also store a reference to its parentcontainer. You can then put something like this into the step event or an alarm or whatever:
Code:
If !instance_exists(daddy) instance_destroy();
And at last: Always store relative xy coordinates, they will be more important than the actual xy vars of all components. But this won't actually be enough, you'd need to write something like a panel stack/grid/canvas system.
GUI-stuff sucks.