tags:

views:

17

answers:

1

How can I convert a BYTE array in a CString in MFC>

A: 

Try this - for eg: - If 'x' is your Byte array then -

BYTE x[5]; 
x[0] = 'A'; 
x[1] = 0; 
x[2] = 'B'; 
x[3] = 'C'; 
x[4] = 0; 

CString str( (LPCSTR) &x, sizeof(x) ); 
Sachin Shanbhag