]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 807060 ] warning free demos
authorJulian Smart <julian@anthemion.co.uk>
Thu, 18 Sep 2003 13:33:34 +0000 (13:33 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 18 Sep 2003 13:33:34 +0000 (13:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

demos/bombs/bombs.cpp
demos/bombs/bombs.h
demos/bombs/bombs1.cpp
demos/forty/card.cpp
demos/forty/game.cpp
demos/forty/pile.cpp
demos/forty/playerdg.cpp
demos/forty/scoredg.cpp
demos/fractal/fractal.cpp
demos/life/life.cpp
demos/poem/wxpoem.cpp

index 26a17794092a9a3f09d4159ba86b5d1af42f8a06..1094797a7eb8088fdb5fddac81be631c86c433e4 100644 (file)
@@ -40,7 +40,7 @@ bool AppClass::OnInit()
   level=IDM_EASY;
 
   BombsFrame = 
-    new BombsFrameClass(NULL, _T("wxBombs"), wxPoint(155, 165), wxSize(300, 300), wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION);
+    new BombsFrameClass(NULL, _T("wxBombs"), wxPoint(155, 165), wxSize(300, 300), wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX );
 
   int xmax=BombsFrame->BombsCanvas->field_width*BombsFrame->BombsCanvas->x_cell*X_UNIT;
   int ymax=BombsFrame->BombsCanvas->field_height*BombsFrame->BombsCanvas->y_cell*Y_UNIT;
@@ -104,17 +104,17 @@ BombsFrameClass::~BombsFrameClass(void)
 {
 }
 
-void BombsFrameClass::OnCloseWindow(wxCloseEvent& event)
+void BombsFrameClass::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
 {
   this->Destroy();
 }
 
-void BombsFrameClass::OnExit(wxCommandEvent& event)
+void BombsFrameClass::OnExit(wxCommandEvent& WXUNUSED(event))
 {
     this->Destroy();
 }
 
-void BombsFrameClass::OnRestart(wxCommandEvent& event)
+void BombsFrameClass::OnRestart(wxCommandEvent& WXUNUSED(event))
 {
     BombsCanvas->UpdateFieldSize();
     int xmax=BombsCanvas->field_width*BombsCanvas->x_cell*X_UNIT;
@@ -122,26 +122,26 @@ void BombsFrameClass::OnRestart(wxCommandEvent& event)
     wxGetApp().BombsFrame->SetClientSize(xmax, ymax);
 }
 
-void BombsFrameClass::OnAbout(wxCommandEvent& event)
+void BombsFrameClass::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
     wxMessageBox(_T("wxBombs (c) 1996 by P. Foggia\n<foggia@amalfi.dis.unina.it>"), _T("About wxBombs"));
 }
 
-void BombsFrameClass::OnEasy(wxCommandEvent& event)
+void BombsFrameClass::OnEasy(wxCommandEvent& WXUNUSED(event))
 {
     menuBar->Check(wxGetApp().level, FALSE);
     wxGetApp().level=IDM_EASY;
     menuBar->Check(wxGetApp().level, TRUE);
 }
 
-void BombsFrameClass::OnMedium(wxCommandEvent& event)
+void BombsFrameClass::OnMedium(wxCommandEvent& WXUNUSED(event))
 {
     menuBar->Check(wxGetApp().level, FALSE);
     wxGetApp().level=IDM_MEDIUM;
     menuBar->Check(wxGetApp().level, TRUE);
 }
 
-void BombsFrameClass::OnDifficult(wxCommandEvent& event)
+void BombsFrameClass::OnDifficult(wxCommandEvent& WXUNUSED(event))
 {
     menuBar->Check(wxGetApp().level, FALSE);
     wxGetApp().level=IDM_DIFFICULT;
@@ -169,8 +169,8 @@ BombsCanvasClass::BombsCanvasClass(wxFrame *parent, const wxPoint& pos, const wx
 
   dc.SetMapMode(wxMM_METRIC);
 
-  int xcm = dc.LogicalToDeviceX(10.0);
-  int ycm = dc.LogicalToDeviceY(10.0);
+  int xcm = dc.LogicalToDeviceX(10);
+  int ycm = dc.LogicalToDeviceY(10);
     // To have a square cell, there must be :
     //    sx*ycm == sy*xcm
   if (chw*ycm < chh*xcm)
@@ -195,7 +195,7 @@ BombsCanvasClass::~BombsCanvasClass(void)
 }
 
 // Called when canvas needs to be repainted.
-void BombsCanvasClass::OnPaint(wxPaintEvent& event)
+void BombsCanvasClass::OnPaint(wxPaintEvent& WXUNUSED(event))
 {
   wxPaintDC dc(this);
 
index d1b8b8017b353593f23bd503abbaf1d9c7b070b5..f34edc6c956efdc2a83d8de9ba6568bda8b1a915 100644 (file)
@@ -94,7 +94,7 @@ class BombsCanvasClass: public wxWindow
 
  void OnPaint(wxPaintEvent& event);
  void DrawField(wxDC *, int xc1, int yc1, int xc2, int yc2);
- void Refresh(int xc1, int yc1, int xc2, int yc2);
+ void RefreshField(int xc1, int yc1, int xc2, int yc2);
  void Uncover(int x, int y);
  void OnEvent(wxMouseEvent& event);
  void UpdateFieldSize();
index e884888349c447c00bc14809d891d7b172904e2c..fba51ace6eac10b56eeaa91670d860b8cb152913 100644 (file)
@@ -148,12 +148,12 @@ void BombsCanvasClass::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2)
     }
 }
 
-/*--------  BombCanvasClass::Refresh(xc1, yc1, xc2, yc2)  -------------*/
+/*--------  BombCanvasClass::RefreshField(xc1, yc1, xc2, yc2)  --------*/
 /* Refreshes the field image                                           */
 /* xc1,yc1 etc. are the (inclusive) limits of the area to be drawn,    */
 /* expressed in cells.                                                 */
 /*---------------------------------------------------------------------*/
-void BombsCanvasClass::Refresh(int xc1, int yc1, int xc2, int yc2)
+void BombsCanvasClass::RefreshField(int xc1, int yc1, int xc2, int yc2)
   {
     wxClientDC dc(this);
     DrawField(& dc, xc1, yc1, xc2, yc2);
@@ -169,7 +169,7 @@ void BombsCanvasClass::Refresh(int xc1, int yc1, int xc2, int yc2)
 void BombsCanvasClass::Uncover(int x, int y)
 {
   wxGetApp().Game.Unhide(x,y);
-  Refresh(x, y, x, y);
+  RefreshField(x, y, x, y);
   if (wxGetApp().Game.IsBomb(x,y) || wxGetApp().Game.GetRemainingCells()==0)
     { wxBell();
       if (!wxGetApp().Game.IsBomb(x,y))
@@ -182,7 +182,7 @@ void BombsCanvasClass::Uncover(int x, int y)
       for(x=0; x<field_width; x++)
        for(y=0; y<field_height; y++)
          wxGetApp().Game.Unhide(x,y);
-      Refresh(0, 0, field_width-1, field_height-1);
+      RefreshField(0, 0, field_width-1, field_height-1);
     }
   else if (!wxGetApp().Game.Get(x, y))
     { int left = ( x > 0 ) ? x-1 : 0;
@@ -212,7 +212,7 @@ void BombsCanvasClass::OnEvent(wxMouseEvent& event)
            && (wxGetApp().Game.IsHidden(x,y)
                || wxGetApp().Game.GetRemainingCells()==0))
         { wxGetApp().Game.Mark(x,y);
-          Refresh(x, y, x, y);
+          RefreshField(x, y, x, y);
           return;
         }
       else if (event.LeftDown() && wxGetApp().Game.IsHidden(x,y)
index 94df4387328be7ae4de57d507c7ba7f7b0adb5c6..dcbe119aa9d1efad94258385907d165c2695e8eb 100644 (file)
@@ -253,117 +253,117 @@ void Card::Draw(wxDC& dc, int x, int y)
                 }
 
                        // Draw the value
-                dc.Blit(x + m_scale*3, y + m_scale*3, valuewidth, valueheight,
+                dc.Blit((wxCoord)(x + m_scale*3), (wxCoord)(y + m_scale*3), valuewidth, valueheight,
                                 &memoryDC, valuewidth * (m_pipValue - 1), valuepos, wxCOPY);
-                dc.Blit(x + m_width - m_scale*3 - valuewidth, y + m_height - valueheight - m_scale*3,
+                dc.Blit((wxCoord)(x + m_width - m_scale*3 - valuewidth), (wxCoord)(y + m_height - valueheight - m_scale*3),
                         valuewidth, valueheight,
                         &memoryDC, valuewidth * (m_pipValue - 1), valuepos+valueheight, wxCOPY);
 
                        // Draw the pips
-                dc.Blit(x + m_scale*3 + valuewidth+2, y + m_scale*3, pipsize, pipsize,
+                dc.Blit((wxCoord)(x + m_scale*3 + valuewidth+2), (wxCoord)(y + m_scale*3), pipsize, pipsize,
                                 &memoryDC, pipsize * m_suit, pippos, wxCOPY);
-                dc.Blit(x + m_width - m_scale*3-valuewidth-pipsize-2, y + m_height - pipsize - m_scale*3,
+                dc.Blit((wxCoord)(x + m_width - m_scale*3-valuewidth-pipsize-2), (wxCoord)(y + m_height - pipsize - m_scale*3),
                         pipsize, pipsize,
                                 &memoryDC, pipsize * m_suit, pipsize+pippos, wxCOPY);
 
                switch (m_pipValue)
                {
                case 1:
-                        dc.Blit(x - symdist + m_width / 2, y - m_scale*5 + m_height / 2, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 2), (wxCoord)(y - m_scale*5 + m_height / 2), symsize, symsize,
                            &memoryDC, symsize * m_suit, sympos, wxCOPY);
                        break;
 
                case 3:
-                        dc.Blit(x - symdist + m_width / 2, y - symdist + m_height / 2, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 2), (wxCoord)(y - symdist + m_height / 2), symsize, symsize,
                            &memoryDC, symsize * m_suit, sympos, wxCOPY);
                case 2:
-                        dc.Blit(x - symdist + m_width / 2,
-                                y - symdist + m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 2),
+                                (wxCoord)(y - symdist + m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
-                        dc.Blit(x - symdist + m_width / 2,
-                                y - symdist + 3 * m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 2),
+                                (wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos2, wxCOPY);
                        break;
 
                case 5:
-                        dc.Blit(x - symdist + m_width / 2, y - symdist + m_height / 2, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 2), (wxCoord)(y - symdist + m_height / 2), symsize, symsize,
                            &memoryDC, symsize * m_suit, sympos, wxCOPY);
                case 4:
-                        dc.Blit(x - symdist +  m_width / 4,
-                                y - symdist + m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist +  m_width / 4),
+                                (wxCoord)(y - symdist + m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
-                        dc.Blit(x - symdist + m_width / 4,
-                                y - symdist + 3 * m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 4),
+                                (wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos2, wxCOPY);
-                        dc.Blit(x - symdist + 3 * m_width / 4,
-                                y - symdist + m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
+                                (wxCoord)(y - symdist + m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
-                        dc.Blit(x - symdist + 3 * m_width / 4,
-                                y - symdist + 3 * m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
+                                (wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos2, wxCOPY);
                        break;
 
                case 8:
-                        dc.Blit(x - symdist + 5 * m_width / 10,
-                                y - symdist + 5 * m_height / 8, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + 5 * m_width / 10),
+                                (wxCoord)(y - symdist + 5 * m_height / 8), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos2, wxCOPY);
                case 7:
-                        dc.Blit(x - symdist + 5 * m_width / 10,
-                                y - symdist + 3 * m_height / 8, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + 5 * m_width / 10),
+                                (wxCoord)(y - symdist + 3 * m_height / 8), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
                case 6:
-                        dc.Blit(x - symdist + m_width / 4,
-                                y - symdist + m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 4),
+                                (wxCoord)(y - symdist + m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
-                        dc.Blit(x - symdist + m_width / 4,
-                                y - symdist + m_height / 2, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 4),
+                                (wxCoord)(y - symdist + m_height / 2), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
-                        dc.Blit(x - symdist + m_width / 4,
-                                y - symdist + 3 * m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 4),
+                                (wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos2, wxCOPY);
-                        dc.Blit(x - symdist + 3 * m_width / 4,
-                                y - symdist + m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
+                                (wxCoord)(y - symdist + m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
-                        dc.Blit(x - symdist + 3 * m_width / 4,
-                                y - symdist + m_height / 2, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
+                                (wxCoord)(y - symdist + m_height / 2), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
-                        dc.Blit(x - symdist + 3 * m_width / 4,
-                                y - symdist + 3 * m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
+                                (wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos2, wxCOPY);
                        break;
 
                case 10:
-                        dc.Blit(x - symdist + m_width / 2,
-                                y - symdist + 2 * m_height / 3, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 2),
+                                (wxCoord)(y - symdist + 2 * m_height / 3), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos2, wxCOPY);
                case 9:
-                        dc.Blit(x - symdist + m_width / 4,
-                                y - symdist2 + m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 4),
+                                (wxCoord)(y - symdist2 + m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
-                        dc.Blit(x - symdist + m_width / 4,
-                                y - symdist2 + 5 * m_height / 12, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 4),
+                                (wxCoord)(y - symdist2 + 5 * m_height / 12), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
-                        dc.Blit(x - symdist + m_width / 4,
-                                y - symdist + 7 * m_height / 12, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 4),
+                                (wxCoord)(y - symdist + 7 * m_height / 12), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos2, wxCOPY);
-                        dc.Blit(x - symdist + m_width / 4,
-                                y - symdist + 3 * m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 4),
+                                (wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos2, wxCOPY);
 
-                        dc.Blit(x - symdist + 3 * m_width / 4,
-                                y - symdist2 + m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
+                                (wxCoord)(y - symdist2 + m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
-                        dc.Blit(x - symdist + 3 * m_width / 4,
-                                y - symdist2 + 5 * m_height / 12, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
+                                (wxCoord)(y - symdist2 + 5 * m_height / 12), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
-                        dc.Blit(x - symdist + 3 * m_width / 4,
-                                y - symdist + 7 * m_height / 12, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
+                                (wxCoord)(y - symdist + 7 * m_height / 12), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos2, wxCOPY);
-                        dc.Blit(x - symdist + 3 * m_width / 4,
-                                y - symdist + 3 * m_height / 4, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
+                                (wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos2, wxCOPY);
-                        dc.Blit(x - symdist + m_width / 2,
-                                y - symdist + m_height / 3, symsize, symsize,
+                        dc.Blit((wxCoord)(x - symdist + m_width / 2),
+                                (wxCoord)(y - symdist + m_height / 3), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
                        break;
                case 11:
@@ -371,14 +371,14 @@ void Card::Draw(wxDC& dc, int x, int y)
                case 13:
                         memoryDC.SelectObject(*m_pictureBmap);
                         int picwidth = 40,picheight = 45;
-                        dc.Blit(x + (m_width-picwidth)/2, y - picheight/2 + m_height/2,
+                        dc.Blit((wxCoord)(x + (m_width-picwidth)/2), (wxCoord)(y - picheight/2 + m_height/2),
                                      picwidth, picheight,
                                 &memoryDC, picwidth * (m_pipValue - 11), 0, wxCOPY);
 
                         memoryDC.SelectObject(*m_symbolBmap);
-                        dc.Blit(x + m_width-(m_width-picwidth)/2-symsize-3,y - picheight/2+m_height/2+1, symsize, symsize,
+                        dc.Blit((wxCoord)(x + m_width-(m_width-picwidth)/2-symsize-3),(wxCoord)(y - picheight/2+m_height/2+1), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos, wxCOPY);
-                        dc.Blit(x + (m_width-picwidth)/2+2,y + picheight/2 + m_height/2-symsize, symsize, symsize,
+                        dc.Blit((wxCoord)(x + (m_width-picwidth)/2+2),(wxCoord)(y + picheight/2 + m_height/2-symsize), symsize, symsize,
                                 &memoryDC, symsize * m_suit, sympos2, wxCOPY);
                        break;
                }
index 9b9048f6de85169424bee16673b936a03bfc3ea5..9eed283867f3924fe0e2cfa28a430cb5419c8a2c 100644 (file)
@@ -193,8 +193,8 @@ void Game::DoMove(wxDC& dc, Pile* src, Pile* dest)
 
                if (frame)
                {
-                       wxNode *node = frame->GetChildren().First();
-                       if (node) canvas = (wxWindow*)node->Data();
+                       wxNode *node = (wxNode *)frame->GetChildren().GetFirst();
+                       if (node) canvas = (wxWindow*)node->GetData();
                }
 
                // This game is over
index 34796835c164503f4bea7a7a7c0219856a279ce8..cf1564751d69325eab66412e2f50c4d321ae429e 100644 (file)
@@ -88,7 +88,7 @@ void Pile::Redraw(wxDC& dc )
        {
                if (m_dx == 0 && m_dy == 0)
                {
-                        if ((canvas) && (canvas->IsExposed(m_x,m_y,Card::GetScale()*60,Card::GetScale()*200)))
+      if ((canvas) && (canvas->IsExposed(m_x,m_y,(int)(Card::GetScale()*60),(int)(Card::GetScale()*200))))
                          m_cards[m_topCard]->Draw(dc, m_x, m_y);
                }
                else
@@ -97,7 +97,7 @@ void Pile::Redraw(wxDC& dc )
                        int y = m_y;
                        for (int i = 0; i <= m_topCard; i++)
                        {
-                              if ((canvas) && (canvas->IsExposed(x,y,Card::GetScale()*60,Card::GetScale()*200)))
+        if ((canvas) && (canvas->IsExposed(x,y,(int)(Card::GetScale()*60),(int)(Card::GetScale()*200))))
                                m_cards[i]->Draw(dc, x, y);
                               x += (int)Card::GetScale()*m_dx;
                               y += (int)Card::GetScale()*m_dy;
@@ -106,7 +106,7 @@ void Pile::Redraw(wxDC& dc )
        }
        else
        {
-            if ((canvas) && (canvas->IsExposed(m_x,m_y,Card::GetScale()*60,Card::GetScale()*200)))
+    if ((canvas) && (canvas->IsExposed(m_x,m_y,(int)(Card::GetScale()*60),(int)(Card::GetScale()*200))))
                Card::DrawNullCard(dc, m_x, m_y);
        }
 }
index 4c5c48e3fc86fce28ea5f67301521fd5e84ba134..32f72be25de3b59fbf1f404cbfed882bfb26e768 100644 (file)
@@ -147,7 +147,7 @@ const wxString& PlayerSelectionDialog::GetPlayersName()
        return m_player;
 }
 
-void PlayerSelectionDialog::OnCloseWindow(wxCloseEvent& event)
+void PlayerSelectionDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
 {
        m_player = _T("");
     EndModal(wxID_CANCEL);
index f4b563a469f4708d8a70989789a48b9dfcb80b9b..2d2dd133896a7276f661c0cae77bbaf8d4c66df9 100644 (file)
@@ -174,7 +174,7 @@ void ScoreDialog::Display()
        Show(TRUE);
 }
 
-void ScoreDialog::OnCloseWindow(wxCloseEvent& event)
+void ScoreDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
 {
     EndModal(wxID_OK);
 }
index 0bf697e9e6184940eab2d9f28a4fbfcc78f12571..dfe30d983e4fb2454fca0bc5c797e46d38a4a1a2 100644 (file)
@@ -122,12 +122,12 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, cons
 }
 
 // Intercept menu commands
-void MyFrame::OnExit(wxCommandEvent& event)
+void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event))
 {
     this->Destroy();
 }
 
-void MyFrame::OnCloseWindow(wxCloseEvent& event)
+void MyFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
 {
     static bool destroyed = FALSE;
     if (destroyed)
@@ -159,7 +159,7 @@ MyCanvas::MyCanvas(wxFrame *frame):
     WaterBrush = wxBrush(wxCol4, wxSOLID);
 }
 
-void MyCanvas::OnPaint(wxPaintEvent& event)
+void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
 {
     wxPaintDC dc(this);
        Draw(dc);
index eff085f3d46b809c28a7134c75908772a5e983ba..22ce390cc1340bd96ac26ca845b6561501203ecf 100644 (file)
@@ -809,7 +809,7 @@ void LifeCanvas::DrawChanged()
 }
 
 // event handlers
-void LifeCanvas::OnPaint(wxPaintEvent& event)
+void LifeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
 {
     wxPaintDC dc(this);
     wxRect  rect = GetUpdateRegion().GetBox();
index 87953b7c5b8797cc1324d445f572fde16d9c0798..ee8c91f592ed2c1a72f4f94f0fa554f47bc0d9ad 100644 (file)
@@ -608,7 +608,7 @@ bool MyApp::OnInit()
 //    randomize();
   pages[0] = 0;
 
-  TheMainWindow = new MainWindow(NULL, 500, _T("wxPoem"), wxPoint(XPos, YPos), wxSize(100, 100), wxCAPTION|wxMINIMIZE_BOX|wxSYSTEM_MENU);
+  TheMainWindow = new MainWindow(NULL, 500, _T("wxPoem"), wxPoint(XPos, YPos), wxSize(100, 100), wxCAPTION|wxMINIMIZE_BOX|wxSYSTEM_MENU|wxCLOSE_BOX);
 
 #ifdef wx_x
   TheMainWindow->SetIcon(Icon(_T("wxpoem")));
@@ -775,7 +775,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
 // Process characters
 void MyCanvas::OnChar(wxKeyEvent& event)
 {
-  switch (event.KeyCode())
+  switch (event.GetKeyCode())
   {
     case 'n':
     case 'N':