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());
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();
}
// '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"));
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 );