]> git.saurik.com Git - wxWidgets.git/commitdiff
gcc 3.1 warning fixes (patch 598343)
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Aug 2002 19:22:52 +0000 (19:22 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Aug 2002 19:22:52 +0000 (19:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/controls/controls.cpp
samples/text/text.cpp
samples/widgets/slider.cpp
samples/widgets/textctrl.cpp

index 3093e61f2f1e3cabd407b307d3675a72d17b5810..a7dc649c7c9617e9ff25a3954b59dfaf89591365 100644 (file)
@@ -272,7 +272,7 @@ public:
                const wxValidator& validator = wxDefaultValidator,
                const wxString& name = wxRadioBoxNameStr)
         : wxRadioBox(parent, id, title, pos, size, n, choices, majorDim,
-                     style, validator, name) { }
+                     style, validator, name) { SetForegroundColour(*wxRED); }
 
 protected:
     void OnFocusGot(wxFocusEvent& event)
@@ -682,6 +682,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
     panel = new wxPanel(m_notebook);
     (void)new MyRadioBox( panel, ID_RADIOBOX, "&That", wxPoint(10,160), wxSize(-1,-1), WXSIZEOF(choices2), choices2, 1, wxRA_SPECIFY_ROWS );
     m_radio = new wxRadioBox( panel, ID_RADIOBOX, "T&his", wxPoint(10,10), wxSize(-1,-1), WXSIZEOF(choices), choices, 1, wxRA_SPECIFY_COLS );
+    m_radio->SetForegroundColour(*wxRED);
 
 #if wxUSE_TOOLTIPS
     m_combo->SetToolTip("This is a natural\ncombobox - can you believe me?");
@@ -709,6 +710,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
     m_slider = new wxSlider( panel, ID_SLIDER, 0, 0, 200, wxPoint(18,90), wxSize(155,-1),
                              wxSL_AUTOTICKS | wxSL_LABELS );
     m_slider->SetTickFreq(40, 0);
+    m_slider->SetToolTip(_T("This is a sliding slider"));
+
     (void)new wxStaticBox( panel, -1, "&Explanation",
                            wxPoint(230,10), wxSize(270,130),
                            wxALIGN_CENTER );
@@ -1224,6 +1227,8 @@ void MyPanel::OnRadioButtons( wxCommandEvent &event )
             }
         case ID_RADIOBOX_FONT:
             {
+                    m_radio->SetForegroundColour(*wxGREEN);
+
                 m_radio->SetFont( *wxITALIC_FONT );
                 break;
             }
@@ -1562,7 +1567,7 @@ void MyFrame::OnIdle( wxIdleEvent& WXUNUSED(event) )
 #endif
                 s_windowFocus->GetClassInfo()->GetClassName()
 #ifdef __WXMSW__
-                , s_windowFocus->GetHWND()
+                , (unsigned int) s_windowFocus->GetHWND()
 #endif
                   );
 
index ff0226a293c8ad5e1a88bffaeb6cf977b2d4d3ce..50e24835aa64697b2ee9b04718af704b29db1996 100644 (file)
@@ -707,8 +707,8 @@ void MyTextCtrl::OnKeyDown(wxKeyEvent& event)
                 wxLogMessage( _T("Current position: %ld\nCurrent line, column: (%ld, %ld)\nNumber of lines: %ld\nCurrent line length: %ld\nTotal text length: %u (%ld)"),
                         pos,
                         line, column,
-                        GetNumberOfLines(),
-                        GetLineLength(line),
+                        (long) GetNumberOfLines(),
+                        (long) GetLineLength(line),
                         GetValue().length(),
                         GetLastPosition());
             }
@@ -1204,7 +1204,7 @@ void MyFrame::OnIdle( wxIdleEvent& event )
 #endif
                 s_windowFocus
 #ifdef __WXMSW__
-                , s_windowFocus->GetHWND()
+                , (unsigned int) s_windowFocus->GetHWND()
 #endif
                   );
 
index fc512cd96612b31f6133811edb9c158124a50712..ec1d8f5a76a7a68b003bfb841aac389e45c2e5ad 100644 (file)
@@ -490,7 +490,7 @@ void SliderWidgetsPage::OnSlider(wxScrollEvent& event)
         If this assert is triggered, there is an unknown slider event which
         should be added to the above eventNames array.
     */
-    wxASSERT_MSG(index >= 0 && index < WXSIZEOF(eventNames),
+    wxASSERT_MSG(index >= 0 && (size_t)index < WXSIZEOF(eventNames),
                  wxT("Unknown slider event") );
 
 
index a32a3e51c2c1bf6dca9f2d9ad6b7fb28b037e902..85b49793edb2a9797fc88a0996e119ba219baca8 100644 (file)
@@ -700,7 +700,8 @@ void TextWidgetsPage::OnButtonLoad(wxCommandEvent& WXUNUSED(event))
         {
             long elapsed = sw.Time();
             wxLogMessage(_T("Loaded file '%s' in %lu.%us"),
-                         filename.c_str(), elapsed / 1000, elapsed % 1000);
+                         filename.c_str(), elapsed / 1000,
+                         (unsigned int) elapsed % 1000);
         }
     }
 }