koralarts
koralarts

Reputation: 2112

WM_SOCKET in Qt

I plan on using Qt to do my TCP/IP and UDP assignment but I am getting an error which states

WM_SOCKET was not declared in this scope

WM_SOCKET was used in

WSAAsyncSelect(socket, this->winId(), WM_SOCKET, FD_ACCEPT|FD_CLOSE);

I have included QMainWindow, winsock2.h, and ws2tcpip. I also added the mingw library.

Am I missing an include file or is it something else?

Upvotes: 0

Views: 697

Answers (1)

Cat Plus Plus
Cat Plus Plus

Reputation: 129774

There is no WM_SOCKET message defined by WinAPI. You are supposed to define it yourself.

#define WM_SOCKET (WM_USER + 1)

Upvotes: 2

Related Questions