]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/controls/controls.cpp
Fix out of bounds string access in wxMSW wxDirDialog.
[wxWidgets.git] / samples / controls / controls.cpp
index 81a62369ba4befe6a2a35a6c8ac087f1d286d4ec..79e9eebecf408231952a19c8be0f4395ed4aa938 100644 (file)
@@ -855,7 +855,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
     m_slider = new wxSlider( panel, ID_SLIDER, 0, 0, 200,
                              wxDefaultPosition, wxSize(155,wxDefaultCoord),
                              wxSL_AUTOTICKS | wxSL_LABELS);
-    m_slider->SetTickFreq(40, 0);
+    m_slider->SetTickFreq(40);
     sz->Add( m_slider, 0, wxALL, 10 );
 
     m_gaugeVert = new wxGauge( panel, wxID_ANY, 100,
@@ -949,9 +949,10 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
     dc.DrawText(wxT("Bitmap"), 30, 40);
     dc.SelectObject( wxNullBitmap );
 
-    (void)new wxBitmapButton(panel, ID_BITMAP_BTN, bitmap, wxPoint(100, 20));
-    (void)new wxToggleButton(panel, ID_BITMAP_BTN_ENABLE,
-                             wxT("Enable/disable &bitmap"), wxPoint(100, 140));
+    wxPanel *panel2 = new wxPanel(panel, -1, wxPoint(100, 0), wxSize(100, 200));
+    (void)new wxBitmapButton(panel2, ID_BITMAP_BTN, bitmap, wxPoint(0, 20));
+    (void)new wxToggleButton(panel2, ID_BITMAP_BTN_ENABLE,
+                             wxT("Enable/disable &bitmap"), wxPoint(0, 140));
 
 #if defined(__WXMSW__) || defined(__WXMOTIF__)
     // test for masked bitmap display