简单方法记录:
int size = strlen((char*)data);
CString msg = strData + "\n\n";
CString ch;
for (int i = 0; i < size; i++)
{
ch.Format("%02X ", ((unsigned char*)data)[i]);
msg += ch;
}
MessageBoxA(NULL, (LPCTSTR)msg, _T("Debug"), MB_OK);