]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/popup/popup.cpp
STC is not a separate library anymore
[wxWidgets.git] / samples / popup / popup.cpp
index 0306e91ccf2748c3c72aaf561a0e5cdece5092f3..14075eaae7af5bdfed1a47112b4af5a0ea82ebc4 100644 (file)
@@ -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"));