#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);
版权声明:本文为博主原创文章,未经博主允许不得转载。