]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dialogs/dialogs.cpp
link against oleacc.lib (needed by wxUSE_ACCESSIBILITY)
[wxWidgets.git] / samples / dialogs / dialogs.cpp
index 026cfb973978be88ec3180fda814c7b778be8298..6bb75cca8e6b7488044360680d37a053d2049610 100644 (file)
@@ -5,11 +5,11 @@
 // Modified by:
 // Created:     04/01/98
 // RCS-ID:      $Id$
-// Copyright:   (c) Julian Smart and Markus Holzem
+// Copyright:   (c) Julian Smart
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
 #pragma implementation
 #pragma interface
 #endif
 #include "wx/wx.h"
 #endif
 
+#ifdef __WXWINCE__
+#include "wx/msw/wince/time.h"
+#endif
+
 #include "wx/colordlg.h"
 #include "wx/filedlg.h"
 #include "wx/dirdlg.h"
@@ -238,7 +242,7 @@ void MyFrame::ChooseColour(wxCommandEvent& WXUNUSED(event) )
         wxColourData retData = dialog.GetColourData();
         col = retData.GetColour();
         myCanvas->SetBackgroundColour(col);
-        myCanvas->Clear();
+        myCanvas->ClearBackground();
         myCanvas->Refresh();
     }
 }
@@ -284,7 +288,7 @@ void MyFrame::ChooseColourGeneric(wxCommandEvent& WXUNUSED(event))
         wxColour col = retData.GetColour();
 //        wxBrush *brush = wxTheBrushList->FindOrCreateBrush(&col, wxSOLID);
         myCanvas->SetBackgroundColour(col);
-        myCanvas->Clear();
+        myCanvas->ClearBackground();
         myCanvas->Refresh();
       }
       dialog->Destroy();
@@ -308,7 +312,7 @@ void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) )
 }
 #endif // wxTEST_GENERIC_DIALOGS_IN_MSW
 
-void MyFrame::LogDialog(wxCommandEvent& event)
+void MyFrame::LogDialog(wxCommandEvent& WXUNUSED(event))
 {
     // calling wxYield() (as ~wxBusyCursor does) shouldn't result in messages
     // being flushed -- test it
@@ -444,10 +448,11 @@ void MyFrame::MultiChoice(wxCommandEvent& WXUNUSED(event) )
     if ( count )
     {
         wxString msg;
-        msg.Printf(wxT("You selected %u items:\n"), count);
+        msg.Printf(wxT("You selected %u items:\n"), (unsigned)count);
         for ( size_t n = 0; n < count; n++ )
         {
-            msg += wxString::Format(wxT("\t%u: %u (%s)\n"), n, selections[n],
+            msg += wxString::Format(wxT("\t%u: %u (%s)\n"),
+                                    (unsigned)n, (unsigned)selections[n],
                                     choices[selections[n]].c_str());
         }
         wxLogMessage(msg);
@@ -529,7 +534,7 @@ void MyFrame::FilesOpen(wxCommandEvent& WXUNUSED(event) )
         for ( size_t n = 0; n < count; n++ )
         {
             s.Printf(_T("File %d: %s (%s)\n"),
-                     n, paths[n].c_str(), filenames[n].c_str());
+                     (int)n, paths[n].c_str(), filenames[n].c_str());
 
             msg += s;
         }
@@ -578,7 +583,7 @@ void MyFrame::DirChoose(wxCommandEvent& WXUNUSED(event) )
 
 void MyFrame::DirChooseNew(wxCommandEvent& WXUNUSED(event) )
 {
-    DoDirChoose(wxDD_NEW_DIR_BUTTON);
+    DoDirChoose(wxDD_DEFAULT_STYLE | wxDD_NEW_DIR_BUTTON);
 }
 
 #if defined(__WXMSW__) || defined(__WXMAC__)
@@ -630,7 +635,7 @@ void MyFrame::ModelessDlg(wxCommandEvent& event)
     }
 }
 
-void MyFrame::ShowTip(wxCommandEvent& event)
+void MyFrame::ShowTip(wxCommandEvent& WXUNUSED(event))
 {
 #if wxUSE_STARTUP_TIPS
     static size_t s_index = (size_t)-1;