diff --git a/samples/sockets/baseclient.cpp b/samples/sockets/baseclient.cpp index 7143c10db5..9cfd83fa4f 100644 --- a/samples/sockets/baseclient.cpp +++ b/samples/sockets/baseclient.cpp @@ -27,7 +27,7 @@ #include "wx/thread.h" const wxEventType wxEVT_WORKER = wxNewEventType(); -#define EVT_WORKER(func) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WORKER, -1, -1, (wxObjectEventFunction) (wxEventFunction) (WorkerEventFunction) & func, (wxObject *) nullptr ), +#define EVT_WORKER(func) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WORKER, -1, -1, wxEVENT_HANDLER_CAST(WorkerEventFunction, func), (wxObject *) nullptr ), const int timeout_val = 1000; diff --git a/samples/sockets/baseserver.cpp b/samples/sockets/baseserver.cpp index 760387afc3..97cb2f9570 100644 --- a/samples/sockets/baseserver.cpp +++ b/samples/sockets/baseserver.cpp @@ -64,7 +64,7 @@ const char *GetSocketErrorMsg(int pSockError) //event sent by workers to server class //after client is served const wxEventType wxEVT_WORKER = wxNewEventType(); -#define EVT_WORKER(func) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WORKER, -1, -1, (wxObjectEventFunction) (wxEventFunction) (WorkerEventFunction) & func, (wxObject *) nullptr ), +#define EVT_WORKER(func) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WORKER, -1, -1, wxEVENT_HANDLER_CAST(WorkerEventFunction, func), (wxObject *) nullptr ), class WorkerEvent : public wxEvent {