如何初始化wxchar[]和与wxString转化?

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
love8gege
In need of some credit
In need of some credit
Posts: 5
Joined: Fri Sep 01, 2017 12:47 pm

如何初始化wxchar[]和与wxString转化?

Postby love8gege » Sun Oct 01, 2017 8:39 am

如题 :
我想定义一个 wxchar[16]并初值为 “0000111100001111” 该如何操作?
再处理完成会,我想将此wxchar[]转化为wxString ,又该如何操作?
谢谢

kipade
Earned some good credits
Earned some good credits
Posts: 118
Joined: Fri Nov 11, 2011 2:45 am
Location: China

Re: 如何初始化wxchar[]和与wxString转化?

Postby kipade » Tue Nov 07, 2017 10:48 am

你可以使用
wxString str = wxT("00011111000000011");
你也可以:wxString str = _("00011111000000011");
你还可以: wxString str = "00011111000000011";
你仍然可以:wxString str = wxString::Format(wxT("00011111000000011"));
....
Slackware GNU/Linux
wxWidgets-3.0.3


Return to “wxWidgets Development (Chinese)”

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests