79331615

Date: 2025-01-05 21:53:24
Score: 1
Natty:
Report link

thanks for your answer, I agree with the fact of using Bind, I also saw this suggestion in Microsoft documentation I think.

I tried this:

t_mainform->Bind(wxEVT_SOCKET, &TcpIP::OnServerAppEvent, this, C_SERVER_ID_APP, wxID_ANY, (wxObject*)NULL);

void TcpIP::OnServerAppEvent(wxSocketEvent& event)
{
   ...
}

and it works, compiles without any error.

regarding connect, I get a 'wxSocketEventHandler undefined', despite that I have included wx/socket.h (in which it is defined and enabled) in the source file.

and ok for using a more up to date wxWidgets, I can see that the latest stable is 3.2.6. But I don't understand why the connect was compiling in another project using the same code.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: JLB85