+//----------------------------------------------------------------------------------------
+bool MainDoc::OnInitView()
+{
+ Sash = p_ProgramCfg->Read(_T("/MainFrame/Sash"), 200);
+ // wxMessageBox("OnInitView() - Begin ","-I->MainDoc::OnInitView");
+ //---------------------------------------------------------------------------------------
+ // create "workplace" window
+ //---------------------------------------------------------------------------------------
+ p_TabArea = new wxTabbedWindow(); // Init the Pointer
+ p_TabArea->Create(p_Splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE);
+ //---------------------------------------------------------------------------------------
+ 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(_T("PgmCtrl")); //, wxBITMAP_TYPE_BMP_RESOURCE); // BJO20000115
+ //---------------------------------------------------------------------------------------
+ p_TabArea->AddTab(p_PgmCtrl,_T("PgmCtrl"),p_FolderClose);
+ delete p_FolderClose; // Memory leak
+ p_FolderClose = NULL;
+ wxUnusedVar(p_FolderClose);
+ //---------------------------------------------------------------------------------------
+ // now create "output" window
+ //---------------------------------------------------------------------------------------
+ p_PageArea = new wxPagedWindow(); // Init the Pointer
+ p_PageArea->Create(p_Splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE);
+ //---------------------------------------------------------------------------------------
+ p_LogWin = new wxTextCtrl(p_PageArea,wxID_ANY,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"), _T("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();
+ //---------------------------------------------------------------------------------------
+#if wxUSE_STATUSBAR
+ Temp0.Printf(_("-I-> MainDoc::OnInitView() - End - %d DSN's found"),i_DSN);
+ p_MainFrame->SetStatusText(Temp0, 0);
+ wxLogMessage(Temp0);
+#endif // wxUSE_STATUSBAR
+ return true;