/* Closes each MDI child, after calling the child's CanClose method to
  ensure that it is Ok to do so. Returns TRUE if all children are closed
  (or there were no children), FALSE if any child can't be closed */
BOOL TMDIFrame::CloseChildren()
{
  if ( !FirstThat(CannotClose, NULL) ) // All children can be closed
  {
    ForEach(CloseChild, NULL);
    return TRUE;
  }
  return FALSE;
}
Ejemplo n.º 2
0
//
/// First calls CanClose on each of the MDI child windows owned by this MDI client.
/// Returns true if all MDI children are closed (or there were no children); otherwise returns false.
//
bool
TMDIClient::CloseChildren()
{
  if (!FirstThat(sCannotClose)) {
    ForEach(sCloseChild);
    return true;
  }
  return false;
}