-#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \
- DECLARE_EVENT_TABLE_ENTRY( \
- wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \
- id, \
- -1, \
- (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
- NULL \
- ),
-
-#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \
- DECLARE_EVENT_TABLE_ENTRY( \
- wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \
- id, \
- -1, \
- (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
- NULL \
- ),
+#define wxNotebookEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxNotebookEventFunction, &func)
+
+#define EVT_NOTEBOOK_PAGE_CHANGED(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, winid, wxNotebookEventHandler(fn))
+
+#define EVT_NOTEBOOK_PAGE_CHANGING(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, winid, wxNotebookEventHandler(fn))