   MFC - CString and binary data
  I'm working on a little editor, but I am having troubles with displaying binary data. My problem is, that I need to copy the binary data from a buffer to the CString, associated with that control. And since CString::operator= expects a nullterminated wchar_t*, there is a problem to copy all binary data to the cstring, since the data might continue after a 0.Do you know a way to achieve this?   
  You can construct a CString() for a LPCTSTR and a size, which should preserve the nulls in the middle of the data. Keep in mind that even if you do copy the data with a null into the control's CString, it still may not display anything after the null anyways.   ;  I tested it, you're right, it doesn't display anything after a zero. Is there a way to display binary data in a CEdit? Maybe a costum control you know?There has to be a way to do this, the windows editor for example is able to display such data.   ;  One thing you can do is substitute the null with a character of your choice when you display it. For example a space or a question mark.   ;  hm, thats right, thanks very much :)   