Hi,
I was wondering how I can add a button to my program to allow me to send a message. For example, if the user clicks a button called "Hello", it will send "Hello" to the receive part of my program.
To send an ordinary message, I am using the following code.
void CSimpleSendDialog::OnBnClickedSendButton()
{
m_pSendText->GetWindowText(m_szSendBuf, SEND_BUFFER_SIZE);
m_iSendLen = (int) strlen(m_szSendBuf);
int iBytesSent = sendto(m_SendSOCKET, (char FAR *)m_szSendBuf, m_iSendLen, 0,
(const struct sockaddr FAR *)&m_SendSockAddr, sizeof(m_SendSockAddr));
}
Thanks for reading and thanks in advance for any response.