X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/414f2513fc42e1ec60954c7c000d7ae78ba6af8c..16a6b53ddc74d62fd1b6b82651d0e3859580c48a:/samples/popup/popup.cpp diff --git a/samples/popup/popup.cpp b/samples/popup/popup.cpp index 0306e91ccf..6ea7c912db 100644 --- a/samples/popup/popup.cpp +++ b/samples/popup/popup.cpp @@ -200,7 +200,7 @@ void SimpleTransientPopup::OnMouse(wxMouseEvent &event) rect.SetWidth(1000000); wxColour colour(*wxLIGHT_GREY); - if (rect.Inside(event.GetPosition())) + if (rect.Contains(event.GetPosition())) { colour = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); wxLogMessage( wxT("0x%lx SimpleTransientPopup::OnMouse pos(%d, %d)"), long(event.GetEventObject()), event.GetX(), event.GetY()); @@ -229,7 +229,7 @@ void SimpleTransientPopup::OnButton(wxCommandEvent& event) void SimpleTransientPopup::OnSpinCtrl(wxSpinEvent& event) { - wxLogMessage( wxT("0x%lx SimpleTransientPopup::OnSpinCtrl ID %d Value %ld"), long(this), event.GetId(), event.GetInt()); + wxLogMessage( wxT("0x%lx SimpleTransientPopup::OnSpinCtrl ID %d Value %d"), long(this), event.GetId(), event.GetInt()); event.Skip(); } @@ -289,6 +289,9 @@ IMPLEMENT_APP(MyApp) // 'Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + // create the main application window m_frame = new MyFrame(_T("Popup wxWidgets App")); @@ -355,7 +358,7 @@ MyFrame::MyFrame(const wxString& title) m_logWin->SetEditable(false); wxLogTextCtrl* logger = new wxLogTextCtrl( m_logWin ); m_logOld = logger->SetActiveTarget( logger ); - logger->SetTimestamp( NULL ); + logger->DisableTimestamp(); wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL ); topSizer->Add( button1, 0, wxALL, 5 );