//TODO: Add your the control notification handler code here
The VARIANT variant_inp;
COleSafeArray safearray_inp;
LONG len, k;
BYTE rxdata [2048].//set An 8-bit BYTE array integerthat is not signed.
Cstrings strtemp;
If (m_ctrlComm GetCommEvent ()==2)//event value of 2 signifies a character
the receive buffer{////////the following you can according to their own communication protocol join processing code
Variant_inp=m_ctrlComm. GetInput ();//read buffer
Safearray_inp=variant_inp;//the VARIANT type variables into ColeSafeArray type
Len=safearray_inp. GetOneDimSize ();//to get effective data length
For (k=0; K
For (k=0; K
BYTE bt=* (char *) (rxdata + k);//character
Strtemp. The Format (" % c ", bt); Deposit/characters into temporary variables strtemp
M_strRXData +=strtemp;//add receive corresponding string edit box
}
}
The UpdateData (FALSE);//update the content of the edit box
}
Could you tell me how to receive text displayed in the edit box to receive
CodePudding user response:
To edit box bound variables, and then directly to his assignment, after the UpdateData (FALSE);Or
Can also send message to edit box
CodePudding user response:
I want to have a serial port to receive the message of the string processing, such as data by, 01 to I want to put 01 and 02, existing in an array of strings, how to implementCodePudding user response:
Who help give a serial communication control, version 6.0CodePudding user response:
Use VectorchenCodePudding user response:
Nrcomm charge for 12, pcomm free
3, Apollo open source
4,,,,,,,,
Forget, a lot, to search a lot,