-BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, 802)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, 803)
-END_DECLARE_EVENT_TYPES()
-
-typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
-
-#define EVT_NOTEBOOK_PAGE_CHANGED(winid, fn) \
- DECLARE_EVENT_TABLE_ENTRY( \
- wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \
- winid, \
- wxID_ANY, \
- (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxNotebookEventFunction, &fn ), \
- NULL \
- ),
-
-#define EVT_NOTEBOOK_PAGE_CHANGING(winid, fn) \
- DECLARE_EVENT_TABLE_ENTRY( \
- wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \
- winid, \
- wxID_ANY, \
- (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxNotebookEventFunction, &fn ), \
- NULL \
- ),
+#define EVT_NOTEBOOK_PAGE_CHANGED(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_NOTEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn))
+
+#define EVT_NOTEBOOK_PAGE_CHANGING(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_NOTEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn))