From: Vadim Zeitlin Date: Thu, 4 Nov 1999 15:59:39 +0000 (+0000) Subject: compilation fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/508379ee46267fdd83c2646896b1c58a68a7dcc7 compilation fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/wxpoem/wxpoem.cpp b/samples/wxpoem/wxpoem.cpp index 4890c8f92a..2a2d89c031 100644 --- a/samples/wxpoem/wxpoem.cpp +++ b/samples/wxpoem/wxpoem.cpp @@ -131,7 +131,6 @@ void CopyToClipboard(HWND, char *); #endif wxMenu *popupMenu = NULL; -void PopupFunction(wxMenu& menu, wxCommandEvent& event); #if wxUSE_HELP wxHelpController *HelpController = NULL; @@ -152,6 +151,7 @@ void CreateFonts() BEGIN_EVENT_TABLE(MainWindow, wxFrame) EVT_CLOSE(MainWindow::OnCloseWindow) EVT_CHAR(MainWindow::OnChar) + EVT_MENU(-1, MainWindow::OnPopup) END_EVENT_TABLE() MainWindow::MainWindow(wxFrame *frame, wxWindowID id, const wxString& title, @@ -616,7 +616,7 @@ bool MyApp::OnInit() TheMainWindow->canvas = new MyCanvas(TheMainWindow, 501, wxDefaultPosition, wxDefaultSize); - popupMenu = new wxMenu("", (wxFunction)PopupFunction); + popupMenu = new wxMenu; popupMenu->Append(POEM_NEXT, "Next poem/page"); popupMenu->Append(POEM_PREVIOUS, "Previous page"); popupMenu->AppendSeparator(); @@ -729,11 +729,10 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) void MyCanvas::OnMouseEvent(wxMouseEvent& event) { - long x, y; - event.Position(&x, &y); static int startPosX, startPosY, startFrameX, startFrameY; - event.Position(&x, &y); + long x, y; + event.GetPosition(&x, &y); if (event.RightDown()) { @@ -1074,7 +1073,7 @@ bool Compile(void) return TRUE; } -void PopupFunction(wxMenu& /*menu*/, wxCommandEvent& event) +void MainWindow::OnPopup(wxCommandEvent& event) { switch (event.GetId()) { diff --git a/samples/wxpoem/wxpoem.h b/samples/wxpoem/wxpoem.h index ea2e00e40f..2f65c220ed 100644 --- a/samples/wxpoem/wxpoem.h +++ b/samples/wxpoem/wxpoem.h @@ -51,6 +51,7 @@ class MainWindow: public wxFrame void OnCloseWindow(wxCloseEvent& event); void OnChar(wxKeyEvent& event); + void OnPopup(wxCommandEvent& event); // Display next page or poem void NextPage(void);