BEGIN_EVENT_TABLE(MyFrame,wxFrame)
EVT_MENU(ID_QUIT, MyFrame::OnQuit)
EVT_CLOSE(MyFrame::OnCloseWindow)
BEGIN_EVENT_TABLE(MyFrame,wxFrame)
EVT_MENU(ID_QUIT, MyFrame::OnQuit)
EVT_CLOSE(MyFrame::OnCloseWindow)
END_EVENT_TABLE()
MyFrame::MyFrame( wxWindow *parent, wxWindowID id, const wxString &title,
END_EVENT_TABLE()
MyFrame::MyFrame( wxWindow *parent, wxWindowID id, const wxString &title,
m_smile1 = new wxCanvasImage( image, 0,70,32,32 );
root->Append( m_smile1 );
m_smile1 = new wxCanvasImage( image, 0,70,32,32 );
root->Append( m_smile1 );
- wxCanvasRect *rect = new wxCanvasRect( 20,20,100,100 );
- rect->SetBrush( *wxRED_BRUSH );
- root->Append( rect );
+ wxCanvasCircle *circ = new wxCanvasCircle( 170,70,50 );
+ circ->SetBrush( *wxBLUE_BRUSH );
+ root->Append( circ );
m_smile2 = new wxCanvasImage( image, 0,110,32,32 );
root->Append( m_smile2 );
m_smile2 = new wxCanvasImage( image, 0,110,32,32 );
root->Append( m_smile2 );
for (i = 15; i < 300; i+=10)
{
wxCanvasRect *r = new wxCanvasRect( i,50,3,140 );
r->SetBrush( *wxRED_BRUSH );
root->Append( r );
}
for (i = 15; i < 300; i+=10)
{
wxCanvasRect *r = new wxCanvasRect( i,50,3,140 );
r->SetBrush( *wxRED_BRUSH );
root->Append( r );
}
// This will call all object and children recursivly so
// all know what their wxCanvasAdmin is. Call at the end.
// This will call all object and children recursivly so
// all know what their wxCanvasAdmin is. Call at the end.
//------------------------------------------------------------------------------
// MyApp
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// MyApp
//------------------------------------------------------------------------------