`

BYTE to CString

 
阅读更多
BYTE byteArray[100]; // with some values
CString strByte;
for ( int i = 0; i < 64; i++ )
{
strByte.Format( "%02x", byteArray[i]);
// output the string
}

 

分享到:
评论

相关推荐

    rsa算法设计 密码学

    CString PrtInt(byteint A); //将一个大数类型转换为一个CString类型 int Getinput(byteint result,CString input); //将字符串转换为对应的大数形式 int Getinput1(byteint result,unsigned long input); //将长...

    一个简单的注册表操作类,c++

    BYTE* pData=(BYTE*)str.GetBuffer(str.GetLength()); DWORD cbData = str.GetLength()*2; str.ReleaseBuffer(); long ret1=::RegSetValueEx(hKey,lpValName,NULL,REG_SZ,pData,cbData); if(ret1!=ERROR_...

    C++MFC教程

    使用CString可不指明内存大小,CString会根据需要自行分配。下面介绍几个成员函数: GetLength 得到字符串长度 GetAt 得到指定位置处的字符 operator + 相当于strcat void Format( LPCTSTR lpszFormat, ... ); ...

    基于sniffer做的一个抓包监控软件

    CString strAboutMenu; strAboutMenu.LoadString(IDS_ABOUTBOX); if (!strAboutMenu.IsEmpty()) { pSysMenu-&gt;AppendMenu(MF_SEPARATOR); pSysMenu-&gt;AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu...

    分割合并文件

    // Set the range to be 0 to 500. pProgress.SetRange(0, 500); // Set the position for (int i = 0; i ; i++) pProgress.SetPos(i); m_parts = _ltoa(l, buff, 10); m_parts += _T("个文件已合并"); ...

    图像增强技术

     CString string ;//字符串对象;  pWnd=GetDlgItem(IDC_Graphic);//得到显示直方图的框架窗口对象指针;  pWndText=GetDlgItem(IDC_NUM);//得到指向文本框对象(IDC_NUM)窗口的指针;  pWnd-&gt;GetWindowRect(&...

    饭客钻石-带网络验证带压力测试

    #define CTCS_EDITLABELS 32 // Allows item text to be edited in place #define CTCS_DRAGMOVE 64 // Allows move items #define CTCS_DRAGCOPY 128 // Allows copy items #define CTCS_CLOSEBUTTON 256 // Close ...

    VC编写的聊天程序

    BYTE f0,f1,f2,f3; CString name; CClientSocket::GetLocalHostName(name); CClientSocket::GetIpAddress(name,f0,f1,f2,f3); ((CIPAddressCtrl *)(GetDlgItem(IDC_IPADDRESS)))-&gt;SetAddress(f0,f1,f2,f3); m_...

    stdafx.h代码

    // This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference and related // electronic documentation provided with the library. // See these sources for ...

    PictureEx头文件

    void WriteDataOnDisk(CString szFileName, HGLOBAL hData, DWORD dwSize); #endif // GIF_TRACING SIZE m_PictureSize; COLORREF m_clrBackground; UINT m_nDataSize; UINT m_nCurrOffset; UINT m_...

    简易的播放器

    CString strAboutMenu; strAboutMenu.LoadString(IDS_ABOUTBOX); if (!strAboutMenu.IsEmpty()) { pSysMenu-&gt;AppendMenu(MF_SEPARATOR); pSysMenu-&gt;AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu...

    数字识别之神经网络法

    CString strAboutMenu; strAboutMenu.LoadString(IDS_ABOUTBOX); if (!strAboutMenu.IsEmpty()) { pSysMenu-&gt;AppendMenu(MF_SEPARATOR); pSysMenu-&gt;AppendMenu(MF_STRING, IDM_ABOUTBOX, ...

    绘图MyPaintView执行文件

    m_pbyBitmapBuf = new BYTE[m_dwSizeBitmap]; return 0; } void CMyPaintView::UpdateImage() { m_pdcMem-&gt;SelectObject(m_pbmBackground); Invalidate(); } void CMyPaintView::XorLine(CPoint pt1,CPoint ...

Global site tag (gtag.js) - Google Analytics