MyPanel *GetPanel() const { return m_panel; }
 
 private:
+#if wxUSE_STATUSBAR
     void UpdateStatusBar(const wxPoint& pos, const wxSize& size)
     {
         if ( m_frameStatusBar )
             SetStatusText(msg, 1);
         }
     }
+#endif // wxUSE_STATUSBAR
 
     MyPanel *m_panel;
 
 
     SetMenuBar(menu_bar);
 
+#if wxUSE_STATUSBAR
     CreateStatusBar(2);
+#endif // wxUSE_STATUSBAR
 
     m_panel = new MyPanel( this, 10, 10, 300, 100 );
 
 
 void MyFrame::OnMove( wxMoveEvent& event )
 {
+#if wxUSE_STATUSBAR
     UpdateStatusBar(event.GetPosition(), GetSize());
+#endif // wxUSE_STATUSBAR
 
     event.Skip();
 }
 
 void MyFrame::OnSize( wxSizeEvent& event )
 {
+#if wxUSE_STATUSBAR
     UpdateStatusBar(GetPosition(), event.GetSize());
+#endif // wxUSE_STATUSBAR
 
     event.Skip();
 }
 #endif
                   );
 
+#if wxUSE_STATUSBAR
         SetStatusText(msg);
+#endif // wxUSE_STATUSBAR
     }
 }
 
 
     void OnShow(wxCommandEvent &event);
     void OnOption(wxCommandEvent &event);
 
+#if wxUSE_COLOURDLG
     wxColour SelectColour();
+#endif // wxUSE_COLOURDLG
     void PrepareDC(wxDC& dc);
 
     int         m_backgroundMode;
     LogicalOrigin_Set,
     LogicalOrigin_Restore,
 
+#if wxUSE_COLOURDLG
     Colour_TextForeground,
     Colour_TextBackground,
     Colour_Background,
+#endif // wxUSE_COLOURDLG
     Colour_BackgroundMode,
     Colour_TextureBackgound,
 
 
 void MyCanvas::OnMouseMove(wxMouseEvent &event)
 {
+#if wxUSE_STATUSBAR
     wxClientDC dc(this);
     PrepareDC(dc);
     m_owner->PrepareDC(dc);
     wxString str;
     str.Printf( wxT("Current mouse position: %d,%d"), (int)x, (int)y );
     m_owner->SetStatusText( str );
+#else
+    wxUnusedVar(event);
+#endif // wxUSE_STATUSBAR
 }
 
 // ----------------------------------------------------------------------------
     menuLogical->Append( LogicalOrigin_Restore, _T("&Restore to normal\tShift-Ctrl-0") );
 
     wxMenu *menuColour = new wxMenu;
+#if wxUSE_COLOURDLG
     menuColour->Append( Colour_TextForeground, _T("Text &foreground...") );
     menuColour->Append( Colour_TextBackground, _T("Text &background...") );
     menuColour->Append( Colour_Background, _T("Background &colour...") );
+#endif // wxUSE_COLOURDLG
     menuColour->AppendCheckItem( Colour_BackgroundMode, _T("&Opaque/transparent\tCtrl-B") );
     menuColour->AppendCheckItem( Colour_TextureBackgound, _T("Draw textured back&ground\tCtrl-T") );
 
     // ... and attach this menu bar to the frame
     SetMenuBar(menuBar);
 
+#if wxUSE_STATUSBAR
     CreateStatusBar(2);
     SetStatusText(_T("Welcome to wxWidgets!"));
+#endif // wxUSE_STATUSBAR
 
     m_mapMode = wxMM_TEXT;
     m_xUserScale = 1.0;
             m_xAxisReversed = !m_xAxisReversed;
             break;
 
+#if wxUSE_COLOURDLG
         case Colour_TextForeground:
             m_colourForeground = SelectColour();
             break;
                 }
             }
             break;
+#endif // wxUSE_COLOURDLG
+
         case Colour_BackgroundMode:
             m_backgroundMode = m_backgroundMode == wxSOLID ? wxTRANSPARENT
                                                            : wxSOLID;
     dc.SetMapMode( m_mapMode );
 }
 
+#if wxUSE_COLOURDLG
 wxColour MyFrame::SelectColour()
 {
     wxColour col;
 
     return col;
 }
+#endif // wxUSE_COLOURDLG