- Sash = p_ProgramCfg->Read("/MainFrame/Sash", 200);
- // wxMessageBox("OnInitView() - Begin ","-I->mjDoc::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);
- //--------------------------------------------------------------------------
- // now create "output" window
- //--------------------------------------------------------------------------
- p_PageArea = new wxPaggedWindow(); // Init the Pointer
- p_PageArea->Create(p_Splitter, -1);
- //--------------------------------------------------------------------------
- p_LogWin = new wxTextCtrl(p_PageArea,-1,wxEmptyString,
- wxDefaultPosition, wxDefaultSize,wxTE_MULTILINE );
- wxFont* ft_Temp = new wxFont(10,wxSWISS,wxNORMAL,wxBOLD,FALSE,"Comic Sans MS");
- p_LogWin->SetFont(* ft_Temp);
- // 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;
- //--------------------------------------------------------------------------
- Temp0.Printf("-I-> mjDoc::OnInitView() - End - %d DSN's found",i_DSN);
- p_MainFrame->SetStatusText(Temp0, 0);
- wxLogMessage(Temp0);
- return TRUE;
+ 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;