1 // ATL_Convert.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include <iostream> 6 #include <atlconv.h> 7 #include <tchar.h> 8 #include <stdio.h> 9 10 11 //USES_CONVERSION; //使用ATL字符转换宏 12 13 int _tmain(int argc, _TCHAR* argv[]) 14 { 15 char a[12] = "china"; 16 USES_CONVERSION; 17 ::MessageBoxW(NULL, A2W(a), L"",MB_ICONASTERISK | MB_TASKMODAL | MB_OK); 18 system("pause"); 19 return 0; 20 }
相关文章: