zaryk 23 Newbie Poster

Winapi - I am creating a chat program using the WSAAsyncSelect(Win.Sock, Win.hWnd, WM_USER + 2, FD_READ | FD_WRITE | FD_CLOSE); and all that good stuff.

The client connects to the server and the server sends a message to the client. In response, the client pops up a messagebox stating "connected". <---Have that. Also, I have a main window, and a dialog box.

From the dialog box ( with 2 edit controls), I want to send/receive the messages. So when I press enter, I need to getdlgitemtext (guess this is the right one) from the sending edit box, send a message to FD_WRITE with the buffer (the message) and then have fd_write send the message. And because from what I understand, also do something with fd_read to automatically post the incoming message to the receiving edit box. I don't think posting it will be too hard, but to have it automatically figure out that there is a message might be tricky.

References to where I can figure out how to do these things would be greatly appreciated.

To accuse me of doing homework is an insult. Have you seen me do homework? Me neither. I am blind.