]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/db/dbtest.cpp
include wx/dynarray.h to fix compilation with minimal set of wxUSE options
[wxWidgets.git] / samples / db / dbtest.cpp
index 8b91e280cde6ab4080ad0c9b94f3d029e820f597..6db33475af98d7e81163bed294fa4bf76bd0b927 100644 (file)
  *  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);