From babd36de3a0c49b23f41cae0478a3bfba4882aa3 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 18 Sep 2003 13:33:34 +0000 Subject: [PATCH] Applied patch [ 807060 ] warning free demos git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- demos/bombs/bombs.cpp | 22 ++++---- demos/bombs/bombs.h | 2 +- demos/bombs/bombs1.cpp | 10 ++-- demos/forty/card.cpp | 116 +++++++++++++++++++------------------- demos/forty/game.cpp | 4 +- demos/forty/pile.cpp | 6 +- demos/forty/playerdg.cpp | 2 +- demos/forty/scoredg.cpp | 2 +- demos/fractal/fractal.cpp | 6 +- demos/life/life.cpp | 2 +- demos/poem/wxpoem.cpp | 4 +- 11 files changed, 88 insertions(+), 88 deletions(-) diff --git a/demos/bombs/bombs.cpp b/demos/bombs/bombs.cpp index 26a1779409..1094797a7e 100644 --- a/demos/bombs/bombs.cpp +++ b/demos/bombs/bombs.cpp @@ -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"), _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); diff --git a/demos/bombs/bombs.h b/demos/bombs/bombs.h index d1b8b8017b..f34edc6c95 100644 --- a/demos/bombs/bombs.h +++ b/demos/bombs/bombs.h @@ -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(); diff --git a/demos/bombs/bombs1.cpp b/demos/bombs/bombs1.cpp index e884888349..fba51ace6e 100644 --- a/demos/bombs/bombs1.cpp +++ b/demos/bombs/bombs1.cpp @@ -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 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) diff --git a/demos/forty/card.cpp b/demos/forty/card.cpp index 94df438732..dcbe119aa9 100644 --- a/demos/forty/card.cpp +++ b/demos/forty/card.cpp @@ -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; } diff --git a/demos/forty/game.cpp b/demos/forty/game.cpp index 9b9048f6de..9eed283867 100644 --- a/demos/forty/game.cpp +++ b/demos/forty/game.cpp @@ -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 diff --git a/demos/forty/pile.cpp b/demos/forty/pile.cpp index 34796835c1..cf1564751d 100644 --- a/demos/forty/pile.cpp +++ b/demos/forty/pile.cpp @@ -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); } } diff --git a/demos/forty/playerdg.cpp b/demos/forty/playerdg.cpp index 4c5c48e3fc..32f72be25d 100644 --- a/demos/forty/playerdg.cpp +++ b/demos/forty/playerdg.cpp @@ -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); diff --git a/demos/forty/scoredg.cpp b/demos/forty/scoredg.cpp index f4b563a469..2d2dd13389 100644 --- a/demos/forty/scoredg.cpp +++ b/demos/forty/scoredg.cpp @@ -174,7 +174,7 @@ void ScoreDialog::Display() Show(TRUE); } -void ScoreDialog::OnCloseWindow(wxCloseEvent& event) +void ScoreDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) { EndModal(wxID_OK); } diff --git a/demos/fractal/fractal.cpp b/demos/fractal/fractal.cpp index 0bf697e9e6..dfe30d983e 100644 --- a/demos/fractal/fractal.cpp +++ b/demos/fractal/fractal.cpp @@ -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); diff --git a/demos/life/life.cpp b/demos/life/life.cpp index eff085f3d4..22ce390cc1 100644 --- a/demos/life/life.cpp +++ b/demos/life/life.cpp @@ -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(); diff --git a/demos/poem/wxpoem.cpp b/demos/poem/wxpoem.cpp index 87953b7c5b..ee8c91f592 100644 --- a/demos/poem/wxpoem.cpp +++ b/demos/poem/wxpoem.cpp @@ -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': -- 2.45.2