Listing 2

struct tab_ctrl : window {
    void add_tab(const string&);
};
tab_ctrl a = ...;
a.text( "My Cool Window"); // ok
tab_ctrl b = a;
// In order for a and b to point to the same window, you would need 
// the tab_ctrl to internally hold a smart pointer to its resources;
// You would also need such a pointer in each window class you create. 
// Therefore, it's much simpler to access all window classes
// by pointers at all times.
b.add_tab("My First Tab");