I have a program that sends a message over a serial port and when I test it with a message like
BYTE Msg[] = "20\r";
everything is ok.
The problem is that I do not want to send "20" everytime.. The message I want to send comes from a CEdit box and I get it with
How can I change this to be a byte-array like my first example?Code:... UpdateData(TRUE); CString Msg; m_Felt3.GetWindowText(Msg); Msg.Format(_T("%s\r"),(LPCTSTR)Msg); UpdateData(FALSE); ...
I also need to know the number of bytes in my message....




Reply With Quote