X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fcf3321f44b0fdf676f41fbc8601e824ff951ff8..7bcc9eb973ea1aba395d6020a9215edf62251aff:/samples/db/dbtest.cpp diff --git a/samples/db/dbtest.cpp b/samples/db/dbtest.cpp index 8b91e280cd..6db33475af 100644 --- a/samples/db/dbtest.cpp +++ b/samples/db/dbtest.cpp @@ -21,10 +21,6 @@ * SYNOPSIS END */ -#ifdef __GNUG__ -#pragma implementation "dbtest.h" -#endif - #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -639,6 +635,9 @@ void CheckSupportForAllDataTypes(wxDb *pDb) bool DatabaseDemoApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + DbConnectInf = NULL; Contact = NULL; @@ -1375,8 +1374,8 @@ void CeditorDlg::OnCommand(wxWindow& win, wxCommandEvent& WXUNUSED(event)) // Display the query dialog box wxChar qryWhere[DB_MAX_WHERE_CLAUSE_LEN+1]; wxStrcpy(qryWhere, (const wxChar*) wxGetApp().Contact->qryWhereStr); - wxChar *tblName[] = {(wxChar *)CONTACT_TABLE_NAME.c_str(), 0}; - new CqueryDlg(GetParent(), wxGetApp().Contact->GetDb(), tblName, qryWhere); + const wxChar *tblName[] = {(const wxChar *)CONTACT_TABLE_NAME.c_str(), 0}; + new CqueryDlg(GetParent(), wxGetApp().Contact->GetDb(), (wxChar**) tblName, qryWhere); // Query the first record in the new record set and // display it, if the query string has changed. @@ -1716,7 +1715,7 @@ bool CeditorDlg::Initialize() void CeditorDlg::OnSelectPict() { - wxFileDialog dlg(this, wxT("Choose an image file less than 60K"), wxEmptyString, wxEmptyString, wxT("JPEG files (*.jpg)|*.jpg|GIF files (*.gif)|*.gif|BMP files (*.bmp)|*.bmp|All Files (*.*)|*.*"), wxOPEN); + wxFileDialog dlg(this, wxT("Choose an image file less than 60K"), wxEmptyString, wxEmptyString, wxT("JPEG files (*.jpg)|*.jpg|GIF files (*.gif)|*.gif|BMP files (*.bmp)|*.bmp|All Files (*.*)|*.*"), wxFD_OPEN); if (dlg.ShowModal() == wxID_OK) { @@ -2923,7 +2922,7 @@ m_pImage(NULL) if(m_pImage->Ok()) { - m_pBmp = new wxBitmap(m_pImage); + m_pBmp = new wxBitmap(*m_pImage); m_pDisplayBmp = new wxStaticBitmap(this, IMAGE_DIALOG_STATIC_BMP, *m_pBmp, wxPoint(5,5), wxDefaultSize); SetSize(m_pBmp->GetWidth() + 10, m_pBmp->GetHeight() + 30);