+ Sash = p_ProgramCfg->Read("/MainFrame/Sash", 200);
+ // wxMessageBox("OnInitView() - Begin ","-I->MainDoc::OnInitView");
+ //---------------------------------------------------------------------------------------
+ // create "workplace" window
+ //---------------------------------------------------------------------------------------
+ p_TabArea = new wxTabbedWindow(); // Init the Pointer
+ p_TabArea->Create(p_Splitter, -1);
+ //---------------------------------------------------------------------------------------
+ p_PgmCtrl = new PgmCtrl(p_TabArea, TREE_CTRL_PGM,wxDefaultPosition, wxDefaultSize,
+ wxTR_HAS_BUTTONS | wxSUNKEN_BORDER);
+ p_PgmCtrl->i_TabArt = 0; // 0 = Tab ; 1 = Page
+ p_PgmCtrl->i_ViewNr = p_TabArea->GetTabCount()-1;
+ //---------------------------------------------------------------------------------------
+ wxBitmap *p_FolderClose = new wxBitmap("PgmCtrl"); //, wxBITMAP_TYPE_BMP_RESOURCE); // BJO20000115
+ //---------------------------------------------------------------------------------------
+ p_TabArea->AddTab(p_PgmCtrl,"PgmCtrl",p_FolderClose);
+ delete p_FolderClose; // Memory leak
+ p_FolderClose = NULL;
+ //---------------------------------------------------------------------------------------
+ // now create "output" window
+ //---------------------------------------------------------------------------------------
+ p_PageArea = new wxPagedWindow(); // Init the Pointer
+ p_PageArea->Create(p_Splitter, -1);
+ //---------------------------------------------------------------------------------------
+ p_LogWin = new wxTextCtrl(p_PageArea,-1,wxEmptyString,
+ wxDefaultPosition, wxDefaultSize,wxTE_MULTILINE );
+ p_LogWin->SetFont(* ft_Doc);
+ // Don't forget ! This is always : i_TabArt = 0 ; i_ViewNr = 1;
+ //---------------------------------------------------------------------------------------
+ p_LogBook = new wxLogTextCtrl(p_LogWin); // make p_LogWin the LogBook
+ p_LogBook->SetActiveTarget(p_LogBook);
+ p_LogBook->SetTimestamp( NULL );
+ //---------------------------------------------------------------------------------------
+ p_PageArea->AddTab(p_LogWin,_("LogBook"), "what is this?" );
+ i_TabNr = p_TabArea->GetTabCount()-1; // Add one when a new AddTab is done;
+ i_PageNr = p_PageArea->GetTabCount()-1; // Add one when a new AddTab is done;
+ //---------------------------------------------------------------------------------------
+ p_PgmCtrl->pDoc = this;
+ p_TabArea->SetActiveTab(i_PageNr);
+ //---------------------------------------------------------------------------------------
+ p_Splitter->Initialize(p_TabArea);
+ p_Splitter->SplitHorizontally(p_TabArea,p_PageArea,Sash);
+ //---------------------------------------------------------------------------------------
+ // if (!OnInitODBC())
+ // return FALSE;
+ OnInitODBC();
+ //---------------------------------------------------------------------------------------
+ Temp0.Printf(_("-I-> MainDoc::OnInitView() - End - %d DSN's found"),i_DSN);
+ p_MainFrame->SetStatusText(Temp0, 0);
+ wxLogMessage(Temp0);
+ return TRUE;
+}