// Author: Mark Johnson
// Modified by: 19990806.mj10777
// Created: 19991010
-// RCS-ID:
+// RCS-ID: $Id$
// Copyright: (c) Mark Johnson, Berlin Germany, mj10777@gmx.net
// Licence: wxWindows license
//---------------------------------------------------------------------------
PgmCtrl::PgmCtrl(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const wxSize& size, long style)
: wxTreeCtrl(parent, id, pos, size, style)
{
- wxFont* ft_Temp = new wxFont(10,wxSWISS,wxNORMAL,wxBOLD,FALSE,"Comic Sans MS");
+ //wxFont* ft_Temp = new wxFont(10,wxSWISS,wxNORMAL,wxBOLD,FALSE,"Comic Sans MS");
+ wxFont* ft_Temp = new wxFont(wxSystemSettings::GetSystemFont(wxSYS_SYSTEM_FONT));
SetFont(* ft_Temp);
// Make an image list containing small icons
// wxMessageBox(SaveDSN);
int i, rc=0;
//-------------------------------------------
- DlgUser p_Dlg(this, "Username and Password", wxPoint(100, 100), wxSize(340, 170));
+ DlgUser *p_Dlg = new DlgUser(this, "Username and Password");
//-------------------------------------------
for (i=0;i<pDoc->i_DSN;i++)
{
if (SaveDSN == (pDoc->p_DSN+i)->Dsn)
{
- p_Dlg.s_DSN = (pDoc->p_DSN+i)->Dsn;
- p_Dlg.s_User = (pDoc->p_DSN+i)->Usr;
- p_Dlg.s_Password = (pDoc->p_DSN+i)->Pas;
- p_Dlg.OnInit();
+ p_Dlg->s_DSN = (pDoc->p_DSN+i)->Dsn;
+ p_Dlg->s_User = (pDoc->p_DSN+i)->Usr;
+ p_Dlg->s_Password = (pDoc->p_DSN+i)->Pas;
+ p_Dlg->OnInit();
+ p_Dlg->Fit();
//--------------------
// Temp0.Printf("i(%d) ; s_DSN(%s) ; s_User(%s) ; s_Password(%s)",i,p_Dlg.s_DSN,p_Dlg.s_User,p_Dlg.s_Password);
// wxMessageBox(Temp0);
- if (p_Dlg.ShowModal() == wxID_OK)
+ bool OK = FALSE;
+ if (p_Dlg->ShowModal() == wxID_OK)
{
- (pDoc->p_DSN+i)->Usr = p_Dlg.s_User;
- (pDoc->p_DSN+i)->Pas = p_Dlg.s_Password;
+ (pDoc->p_DSN+i)->Usr = p_Dlg->s_User;
+ (pDoc->p_DSN+i)->Pas = p_Dlg->s_Password;
(pDoc->db_Br+i)->UserName = (pDoc->p_DSN+i)->Usr;
(pDoc->db_Br+i)->Password = (pDoc->p_DSN+i)->Pas;
+ OK = TRUE;
}
- p_Dlg.Destroy();
+ delete p_Dlg;
+ if (!OK) return;
//--------------------
- goto Weiter; // We have what we want, leave
+ break; // We have what we want, leave
}
}
- Weiter:
+
//-------------------------------------------
SaveDSN.Empty();
}