wxstring与其他类型转换

 1.1 int to wxString:
wxString str = wxString::Format(wxT("%i"),myInt);
1.2 wxString to int :
int i; i = wxAtoi(str);
1.3 string to wxString:
std::string stlString = "sdfas"; wxString mystr(stlString .c_str(),wxConvUTF8);
1.4 wxString to string:
wxString mystring(wxT("HelloWorld"));
std::string stlstring = std::string(mystring.mb_str());
1.5 char* to wxString:
char* chars = "Hello world";
wxString mystring(chars, wxConvUTF8);
1.6 wxString to char*:
char* cs = str.mb_str(wxConvUTF8);
法2:wxString to UTF- to char*(即string)
wxString wx;const wxCharBuffer wxc = wx.ToUTF8(); const char *wxs= wxc;
1.7 char[] to wxString:
char chars[] = "sefasd";
wxstring mystring(chars, wxConvUTF8);
1.8 wxString to char[]:
wxString mystring(wxT("HelloWorld"));
char cstring[];
strcpy(cstring, (const char*)mystring.mb_str(wxConvUTF8)); wxdatetime 与wxstring转换
2.1 wxdatetime to wxstring :
wxDateTime dt = CalendarCtrl1->GetDate();
wxString msg = dt.Format(wxT("%Y-%m-%d"),wxDateTime::A_EST);
2.2 wxstring to wxdatetime: char* ca = "2008-09-03";wxDateTime dt;dt.ParseDate(ca);

最新文章

  1. ThinkPHP框架下的表单验证
  2. js控制 固定框架内图片 按比例显示 以及 占满框架 居中显示
  3. 手动配置 Android SDK
  4. Linux 开机启动方式设置 inittab 详解,开机直接进入“命令行”模式
  5. 对“Java”的诞生历史、特点、定义等HR常问的简单题
  6. 上不了Google是码农的悲哀
  7. WinCE5.0中文模拟器SDK(VS2005)的配置
  8. 数据结构(12) -- 图的邻接矩阵的DFS和BFS
  9. PHP PDO函数库具体解释
  10. 生意经:研究一下国外SAAS的产品线,比如Salesforce、Netsuite和Zendesk等等(Salesforce斥资7.5亿美元收购云计算字处理应用Quip)
  11. logstash 安装WARNING: SSLSocket#session= is not supported
  12. rsyslog Properties 属性:
  13. Pro Android 4 第五章 理解Intent
  14. Java EE (11) - 影响性能的因素
  15. jenkins创建multibranch pipeline
  16. Python3 urllib.request库的基本使用
  17. h2engine游戏服务器设计之聊天室示例
  18. linux shell set命令
  19. Sublime Text3 C++ 设置
  20. leetcode42

热门文章

  1. 6.dockerfile
  2. 【leetcode】1079. Letter Tile Possibilities
  3. python中sort与sorted区别
  4. C# 与 C++,语法差别有多小-其他2
  5. B/S上传整个文件夹
  6. CodeForces - 1183H Subsequences (hard version) (DP)
  7. 秒杀Servlce接口设计
  8. 『转』一千行MySQL学习笔记
  9. Flannel - 配置
  10. 《STL源码剖析》——第七、八章:仿函数与接配器