CString DOWRD互转 20080110 08:26 378人阅读 评论(0) 收藏

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);

版权声明:本文为博主原创文章,未经博主允许不得转载。

原文地址:https://www.cnblogs.com/deman/p/4716625.html