#endif
#if !wxUSE_CONSTRAINTS
-#error You must set wxUSE_CONSTRAINTS to 1 in wx_setup.h!
+#error You must set wxUSE_CONSTRAINTS to 1 in setup.h!
#endif
#include <ctype.h>
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( _T("Load text file"), (const wxChar *) NULL,
+ (const wxChar *) NULL, (const wxChar *) NULL, _T("*.txt") );
+ if (s != "")
{
#ifdef __WXMSW__
frame->text_window->LoadFile(s);
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);
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 );
}
frame->Draw(dc,TRUE);
}
-// Define the behaviour for the frame closing
-// - must delete all frames except for the main one.
-bool MyFrame::OnClose(void)
-{
- Show(FALSE);
-
- return TRUE;
-}
SizerFrame::SizerFrame(wxFrame *frame, char *title, int x, int y, int w, int h):
wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
panel->Layout();
}
-bool SizerFrame::OnClose(void)
-{
- Show(FALSE);
-
- return TRUE;
-}
-