obj << close Window; // or close( dt, nosave );
If this does not meet your need, can you provide more details.