Returns the area's closest frame or dialog ancestor. For a frame or dialog area, the frame or dialog itself is returned.