示例#1
0
//////////////////////////////////////////////////////////
// mtlrchApp
// =====
// Response Table handlers:
//
void mtlrchApp::EvNewView (TView& view)
{
    TMDIClient *mdiClient = TYPESAFE_DOWNCAST(GetMainWindow()->GetClientWindow(), TMDIClient);
    if (mdiClient) {
        mtlrchMDIChild* child = new mtlrchMDIChild(*mdiClient, 0, view.GetWindow());

        // Associate ICON w/ this child window.
        child->SetIcon(this, IDI_DOC);

        child->Create();
    }
}
示例#2
0
//
/// Force view title and index update.
//
void
TDocument::ReindexFrames()
{
  TView* view;
  int seq;

  for (seq = -1, view = ViewList; view != 0; view = view->NextView) {
    seq -= view->SetDocTitle(Title, seq);  // decrement if title displayed
    if (seq == -3)   // need only check if more than one title displayed
      break;
  }
  if (seq == -1)
    return;
  seq = (seq == -2 ? 0 : 1);
  for (view = ViewList; view != 0; view = view->NextView) 
    {
    //DLN: added this if condition to avoid PRECONDITIONs in debug build
    // which occur if program closed by closing main window
    if ( view->GetWindow() && view->GetWindow()->GetHandle() )
    seq += view->SetDocTitle(Title, seq);  // increment if title displayed
  }
}