CString DOWRD互转

来源:互联网 发布:js延迟函数 编辑:程序博客网 时间:2024/05/19 01:13
CString怎样转换成DOWRD

#include   "stdafx.h"
#include   <stdlib.h>
#include   <windows.h>
int   _tmain(int   argc,   _TCHAR*   argv[])
{
TCHAR   szNum[]=_T("123456");//原字符
DWORD       dwValue       =       _tcstoul(szNum,       NULL,       16);//把字符转成16位整数    
printf("%x",   dwValue);

return   0;
}
//dwValue   =1193046也就是0x123456.

//---------------------------------------------------------

 DOWRD怎样转换成CString

CString str;
DWORD dwValue = 111;
str.Format("%d", dwValue);
原创粉丝点击