X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c67daf87774c71ae9f73af9969008af220e52a11..6085b116d60c1f5e6b8a036aed1941477182867d:/samples/layout/layout.cpp diff --git a/samples/layout/layout.cpp b/samples/layout/layout.cpp index 31229f5a88..e33b97fad9 100644 --- a/samples/layout/layout.cpp +++ b/samples/layout/layout.cpp @@ -20,8 +20,8 @@ #include "wx/wx.h" #endif -#if !USE_CONSTRAINTS -#error You must set USE_CONSTRAINTS to 1 in wx_setup.h! +#if !wxUSE_CONSTRAINTS +#error You must set wxUSE_CONSTRAINTS to 1 in wx_setup.h! #endif #include @@ -171,8 +171,8 @@ END_EVENT_TABLE() void MyFrame::LoadFile(wxCommandEvent& WXUNUSED(event) ) { - char *s = wxFileSelector("Load text file", (const char *) NULL, (const char *) NULL, (const char *) NULL, "*.txt"); - if (s) + wxString s = wxFileSelector("Load text file", (const char *) NULL, (const char *) NULL, (const char *) NULL, "*.txt"); + if (s != "") { #ifdef __WXMSW__ frame->text_window->LoadFile(s); @@ -205,12 +205,12 @@ void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event) ) void MyFrame::Draw(wxDC& dc, bool WXUNUSED(draw_bitmaps) ) { - dc.SetPen(wxGREEN_PEN); + dc.SetPen(* wxGREEN_PEN); dc.DrawLine(0, 0, 200, 200); dc.DrawLine(200, 0, 0, 200); - dc.SetBrush(wxCYAN_BRUSH); - dc.SetPen(wxRED_PEN); + dc.SetBrush(* wxCYAN_BRUSH); + dc.SetPen(* wxRED_PEN); dc.DrawRectangle(100, 100, 100, 50); dc.DrawRoundedRectangle(150, 150, 100, 50, 20); @@ -219,7 +219,7 @@ void MyFrame::Draw(wxDC& dc, bool WXUNUSED(draw_bitmaps) ) dc.DrawSpline(50, 200, 50, 100, 200, 10); dc.DrawLine(50, 230, 200, 230); - dc.SetPen(wxBLACK_PEN); + dc.SetPen(* wxBLACK_PEN); dc.DrawArc(50, 300, 100, 250, 100, 300 ); }