ansi --- Unicode

Posted on 2010-08-20 09:49 傅先生 阅读(218) 评论(0)  编辑 收藏 引用 所属分类: C++开发常见错误
  



wchar_t pwchello[500];
  ReadProcessMemory(hProcess,(LPVOID)iNum,&pwchello,800,NULL);
  mess_context.Format("内容为:");
  
  
  //   AfxMessageBox(pwchello);
  CString atemp[50];
  wchar_t *chTest=new wchar_t[pCopyDataStruct->cbData-10];
  
  //  MessageBox(NULL,"","");
  for(int i=0;i<pCopyDataStruct->cbData-10;i++)
  {
   chTest[i]=pwchello[i];
   temp.Format("%X",pwchello[i]);
   mess_context+=temp;
   //              atemp[i]=m_MessageContex[i];
  }  
  MessageBoxW(NULL,chTest,chTest,MB_OK|MB_ICONINFORMATION);




//////////////////
 // wchar_t str[]=L"中国";
 /*
 TCHAR szTest[256] = _T("This is a Test String!");
 CString str(szTest);
 AfxMessageBox(str);
 wchar_t szTest1[256] = _T("Also a test string!");
 str = szTest1;
 AfxMessageBox(str);
 str.Format(_T("%s"), _T("Again!!!It's a test string!"));
 wchar_t *szTest2;
 szTest2 = str.GetBuffer(str.GetLength());
 TRACE1("%s", szTest2);  */
 /*
 setlocale(LC_ALL,"chs");
 wchar_t test[] = L"测试Test";
 wprintf(L"%s",test);
 
   CString temp;
  
  //temp.Format(L"%s",test);
  //AfxMessageBox(str);
  
 MessageBoxW(NULL,test,test,MB_OK|MB_ICONINFORMATION);*/

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


posts - 54, comments - 5, trackbacks - 0, articles - 2

Copyright © 傅先生