MyFrame *frame = new MyFrame(_T("Erase sample"),
wxPoint(50, 50), wxSize(450, 340));
- frame->Show(TRUE);
+ frame->Show(true);
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
- : wxFrame((wxFrame *)NULL, -1, title, pos, size)
+ : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
{
SetIcon(wxICON(mondrian));
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
- Close(TRUE);
+ Close(true);
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
END_EVENT_TABLE()
MyCanvas::MyCanvas( MyFrame *parent )
- : wxScrolledWindow( parent, -1, wxDefaultPosition, wxDefaultSize,
+ : wxScrolledWindow( parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxScrolledWindowStyle |
wxNO_FULL_REPAINT_ON_RESIZE|
wxSUNKEN_BORDER )
m_bitmap = wxBitmap( wxICON(mondrian) );
- new wxStaticBitmap( this, -1, m_bitmap, wxPoint(80,20) );
+ new wxStaticBitmap( this, wxID_ANY, m_bitmap, wxPoint(80,20) );
}
void MyCanvas::OnChar( wxKeyEvent &event )
dc.SetBrush( *wxBLACK_BRUSH );
dc.DrawRectangle( 0,0,200,50 );
- dc.DrawBitmap( m_bitmap, 10, 20, TRUE );
+ dc.DrawBitmap( m_bitmap, 10, 20, true );
dc.SetTextForeground(*wxBLUE);
dc.DrawText(_T("This text is drawn from OnPaint"), 65, 65);