//---------------------------------------------------------------------------
// Connect to datasource
//---------------------------
- DlgUser p_Dlg(pDoc->p_MainFrame, "Username and Password");
- p_Dlg.s_DSN = ODBCSource;
- p_Dlg.s_User = UserName;
- p_Dlg.s_Password = Password;
- p_Dlg.OnInit();
- p_Dlg.Fit();
+ DlgUser *p_Dlg = new DlgUser(pDoc->p_MainFrame, "Username and Password");
+ p_Dlg->s_DSN = ODBCSource;
+ p_Dlg->s_User = UserName;
+ p_Dlg->s_Password = Password;
+ p_Dlg->OnInit();
+ p_Dlg->Fit();
bool OK = FALSE;
- if (p_Dlg.ShowModal() == wxID_OK)
+ if (p_Dlg->ShowModal() == wxID_OK)
{
- (pDoc->p_DSN+i_Which)->Usr = p_Dlg.s_User;
- (pDoc->p_DSN+i_Which)->Pas = p_Dlg.s_Password;
- UserName = p_Dlg.s_User;
- Password = p_Dlg.s_Password;
+ (pDoc->p_DSN+i_Which)->Usr = p_Dlg->s_User;
+ (pDoc->p_DSN+i_Which)->Pas = p_Dlg->s_Password;
+ UserName = p_Dlg->s_User;
+ Password = p_Dlg->s_Password;
OK = TRUE;
}
- p_Dlg.Destroy();
+ //p_Dlg.Destroy();
+ delete p_Dlg;
if (OK)
{
} // if((pDoc->db_Br+i_Which)->Initialize(FALSE))
else
{
+ return 0;
wxLogMessage(_("\n-E-> DBTree::OnPopulate() : A valid Pointer could not be created : Failed"));
}
//----------------------------------------------------------------------------------------------------------------------------
bool mjDoc::OnNewDocument()
{
//-------------------------------------------------------------------
- if (!OnInitView()) // LogBook is now activ
+ if (!OnInitView())
+ {
return FALSE;
+ }
p_PgmCtrl->OnPopulate();
//-------------------------------------------------------------------
return TRUE;
long x,w,h;
// set select default font of the window into it's device context
- dc.SetFont( GetLabelingFont() );
+ //dc.SetFont( GetLabelingFont() );
dc.SetTextBackground( GetBackgroundColour() );
long w,h;
// set select default font of the window into it's device context
- dc.SetFont( GetLabelingFont() );
+ //dc.SetFont( GetLabelingFont() );
dc.GetTextExtent(tab.mText, &w, &h );
long w,h;
// set select default font of the window into it's device context
- dc.SetFont( GetLabelingFont() );
+ //dc.SetFont( GetLabelingFont() );
dc.SetTextBackground( brush.GetColour() );
long w,h;
// set select default font of the window into it's device context
- dc.SetFont( GetLabelingFont() );
+ //dc.SetFont( GetLabelingFont() );
dc.GetTextExtent(tab.mText, &w, &h );
tab.mDims.x = w + tab.ImageToTxtGap(mImageTextGap) +