diff --git a/include/wx/event.h b/include/wx/event.h index aa5431881c..05bc779236 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -1075,11 +1075,16 @@ class WXDLLEXPORT wxEvtHandler: public wxObject virtual bool ProcessEvent(wxEvent& event); virtual bool SearchEventTable(wxEventTable& table, wxEvent& event); - - void Connect( int id, int lastId, - int eventType, + + // Dynamic association of a member function handler with the event handler, id and event type + void Connect( int id, int lastId, wxEventType eventType, wxObjectEventFunction func, wxObject *userData = (wxObject *) NULL ); + + // Convenience function: take just one id + inline void Connect( int id, wxEventType eventType, + wxObjectEventFunction func, + wxObject *userData = (wxObject *) NULL ) { Connect(id, -1, eventType, func, userData); } bool SearchDynamicEventTable( wxEvent& event ); diff --git a/src/common/config.cpp b/src/common/config.cpp index 9f25a1f05b..1510e939a7 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -42,7 +42,7 @@ // we must include (one of) these files for wxConfigBase::Create #if defined(__WXMSW__) && defined(wxCONFIG_WIN32_NATIVE) #ifdef __WIN32__ - #include + #include #else //WIN16 #include #endif diff --git a/src/common/event.cpp b/src/common/event.cpp index 402ee199c2..14f9904a0f 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -398,7 +398,7 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event) } void wxEvtHandler::Connect( int id, int lastId, - int eventType, + wxEventType eventType, wxObjectEventFunction func, wxObject *userData ) {