diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 6a64e31cf0..8dc971ecbc 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -757,8 +757,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) #if !defined(__WXMOTIF__) && !defined(__WIN16__) // wxStaticBitmap not working under Motif yet; and icons not allowed under WIN16. wxIcon icon = wxArtProvider::GetIcon(wxART_INFORMATION); - wxStaticBitmap *bmpStatic = new wxStaticBitmap(panel, -1, icon, - wxPoint(10, 10)); + (void) new wxStaticBitmap( panel, -1, icon, wxPoint(10, 10) ); // VZ: don't leak memory // bmpStatic = new wxStaticBitmap(panel, -1, wxNullIcon, wxPoint(50, 10)); @@ -1254,8 +1253,8 @@ void MyPanel::OnSpinCtrlText(wxCommandEvent& event) if ( m_spinctrl ) { wxString s; - s.Printf(_T("Spin ctrl text changed: now %d (from event: %s)\n"), - m_spinctrl->GetValue(), event.GetString()); + s.Printf( _T("Spin ctrl text changed: now %d (from event: %s)\n"), + m_spinctrl->GetValue(), event.GetString().c_str() ); m_text->AppendText(s); } } @@ -1265,8 +1264,8 @@ void MyPanel::OnSpinCtrl(wxSpinEvent& event) if ( m_spinctrl ) { wxString s; - s.Printf(_T("Spin ctrl changed: now %d (from event: %d)\n"), - m_spinctrl->GetValue(), event.GetInt()); + s.Printf( _T("Spin ctrl changed: now %d (from event: %ld)\n"), + m_spinctrl->GetValue(), event.GetInt() ); m_text->AppendText(s); } } @@ -1275,8 +1274,9 @@ void MyPanel::OnSpinCtrlUp(wxSpinEvent& event) { if ( m_spinctrl ) { - m_text->AppendText(wxString::Format(_T("Spin up: %d (from event: %d)\n"), - m_spinctrl->GetValue(), event.GetInt())); + m_text->AppendText( wxString::Format( + _T("Spin up: %d (from event: %ld)\n"), + m_spinctrl->GetValue(), event.GetInt() ) ); } } @@ -1284,8 +1284,9 @@ void MyPanel::OnSpinCtrlDown(wxSpinEvent& event) { if ( m_spinctrl ) { - m_text->AppendText(wxString::Format(_T("Spin down: %d (from event: %d)\n"), - m_spinctrl->GetValue(), event.GetInt())); + m_text->AppendText( wxString::Format( + _T("Spin down: %d (from event: %ld)\n"), + m_spinctrl->GetValue(), event.GetInt() ) ); } } diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp index 892a621cc1..41b7851501 100644 --- a/samples/dnd/dnd.cpp +++ b/samples/dnd/dnd.cpp @@ -1760,7 +1760,7 @@ void DnDShapeFrame::OnDrop(wxCoord x, wxCoord y, DnDShape *shape) wxPoint pt(x, y); wxString s; - s.Printf(wxT("Shape dropped at (%ld, %ld)"), pt.x, pt.y); + s.Printf(wxT("Shape dropped at (%d, %d)"), pt.x, pt.y); SetStatusText(s); shape->Move(pt);