]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/controls/controls.cpp
Compile fix for *newest* mingw32
[wxWidgets.git] / samples / controls / controls.cpp
index 284420de19e8d4839bec9d7156f2d18d175982dd..12a60a156cc50bf2de7524e27c76f61c4e9fdb2c 100644 (file)
@@ -164,7 +164,7 @@ bool MyApp::OnInit()
 
     frame->SetIcon( wxICON(mondrian) );
 
-    wxMenu *file_menu = new wxMenu;
+    wxMenu *file_menu = new wxMenu("",  wxMENU_TEAROFF );
     file_menu->Append(MINIMAL_ABOUT, "&About\tF1");
     file_menu->Append(MINIMAL_QUIT, "E&xit\tAlt-X", "Quit controls sample");
 
@@ -397,6 +397,16 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
     (void)new wxButton( panel, ID_CHOICE_DELETE, "Delete selected item", wxPoint(180,130), wxSize(140,30) );
     (void)new wxButton( panel, ID_CHOICE_FONT, "Set Italic font", wxPoint(340,130), wxSize(140,30) );
     (void)new wxCheckBox( panel, ID_CHOICE_ENABLE, "Disable", wxPoint(20,130), wxSize(140,30) );
+
+    wxIcon icon = wxTheApp->GetStdIcon(wxICON_INFORMATION);
+    wxSize sizeIcon = wxSize(icon.GetWidth(), icon.GetHeight());
+
+    wxStaticBitmap *bitmap = new wxStaticBitmap( panel, -1, icon, wxPoint(50, 60), sizeIcon);
+
+    // this doesn't work under wxGTK
+    bitmap = new wxStaticBitmap( panel, -1, wxNullBitmap, wxPoint(10, 60), sizeIcon);
+    bitmap->SetBitmap(icon);
+
     m_notebook->AddPage(panel, "wxChoice", FALSE, Image_Choice);
 
     panel = new wxPanel(m_notebook);
@@ -750,7 +760,7 @@ void MyPanel::OnShowProgress( wxCommandEvent& WXUNUSED(event) )
                             "An informative message",
                             max,    // range
                             this,   // parent
-                            wxPD_CAN_ABORT | wxPD_APP_MODAL);
+                            wxPD_CAN_ABORT | wxPD_APP_MODAL | wxPD_ELAPSED_TIME | wxPD_ESTIMATED_TIME | wxPD_REMAINING_TIME);
                             
 
     bool cont = TRUE;
@@ -769,7 +779,6 @@ void MyPanel::OnShowProgress( wxCommandEvent& WXUNUSED(event) )
         {
             cont = dialog.Update(i);
         }
-       wxYield();
     }
 
     if ( !cont )