Search found 28 matches

by newage
Thu Dec 11, 2014 9:56 am
Forum: C++ Development
Topic: How to convert wxInputStream to wxBitmap?
Replies: 2
Views: 589

How to convert wxInputStream to wxBitmap?

My English is poor. :cry: call the websize and it will return me a PNG file. http://api.map.baidu.com/staticimage?center=116.403874,39.914888&width=300&height=200&zoom=11 void xxxx() { wxString str_URL = "http://api.map.baidu.com/staticimage?center=116.403874,39.914888&width=300&height=200&zoom=11";...
by newage
Mon Aug 11, 2014 8:03 am
Forum: C++ Development
Topic: where is the error of code? (wxString::mb_str())
Replies: 7
Views: 1403

Re: where is the error of code? (wxString::mb_str())

Thank doublemax. ^_^
by newage
Mon Aug 11, 2014 7:05 am
Forum: C++ Development
Topic: where is the error of code? (wxString::mb_str())
Replies: 7
Views: 1403

Re: where is the error of code? (wxString::mb_str())

as there. http://forums.wxwidgets.org/viewtopic.php?f=1&t=37654&hilit=wxScopedCharTypeBuffer http://docs.wxwidgets.org/trunk/classwx_scoped_char_type_buffer.html template<typename T> class wxScopedCharTypeBuffer< T > wxScopedCharTypeBuffer<T> is a template class for storing characters. Data are stor...
by newage
Mon Aug 11, 2014 3:11 am
Forum: C++ Development
Topic: where is the error of code? (wxString::mb_str())
Replies: 7
Views: 1403

Re: where is the error of code? (wxString::mb_str())

1: #define wxSafeConvUTF8 wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_OCTAL) if repalce wxSafeConvUTF8 with wxConvUTF8, it will work. As your said,maybe I should check if the string is empty. 2: p = str_tmp.mb_str(xx); I search bbs know that the code is not good(you reply to other people^_^). Bu...
by newage
Sun Aug 10, 2014 6:52 pm
Forum: C++ Development
Topic: where is the error of code? (wxString::mb_str())
Replies: 7
Views: 1403

Re: where is the error of code? (wxString::mb_str())

wx3.0.1
win7 x64
gcc 4.8
by newage
Sun Aug 10, 2014 6:49 pm
Forum: C++ Development
Topic: where is the error of code? (wxString::mb_str())
Replies: 7
Views: 1403

where is the error of code? (wxString::mb_str())

This is my code: void Tree::Encoding(xx* node, const wxMBConv& src, const wxMBConv& encoding) { if (!node) return; Property *prop; wxString str_tmp; const char *p; for (prop = node->props; prop; prop = prop->next) { //src to encoding str_tmp = wxString(wxString(prop->value, wxSafeConvUTF8).mb_str(sr...
by newage
Sat Aug 09, 2014 2:56 pm
Forum: C++ Development
Topic: Why is the wxString empty?
Replies: 6
Views: 1237

Re: Why is the wxString empty?

invalid:
wxString str(p, wxCSConv("UTF-8"));

valid:
#define wxSafeConvUTF8 wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_PUA)
wxString str(p, wxSafeConvUTF8);


MAP_INVALID_UTF8_TO_PUA or MAP_INVALID_UTF8_TO_OCTAL is valid.

Default is MAP_INVALID_UTF8_NOT.So the str is empty.^_^
by newage
Sat Aug 09, 2014 12:17 pm
Forum: C++ Development
Topic: Why is the wxString empty?
Replies: 6
Views: 1237

Re: Why is the wxString empty?

Thanks a lot for doublemax's help.^_^
by newage
Sat Aug 09, 2014 11:40 am
Forum: C++ Development
Topic: Why is the wxString empty?
Replies: 6
Views: 1237

Re: Why is the wxString empty?

How can I do the UTF8 decoder don't detects an invalid byte sequence?(Sorry,my english is poor :oops: )
by newage
Sat Aug 09, 2014 11:20 am
Forum: C++ Development
Topic: Why is the wxString empty?
Replies: 6
Views: 1237

Re: Why is the wxString empty?

thanks
by newage
Sat Aug 09, 2014 10:05 am
Forum: C++ Development
Topic: Why is the wxString empty?
Replies: 6
Views: 1237

Why is the wxString empty?

text: XX[ I am an ascii string, I am a GB2312 string ] Example 1 input: GB2312 wxString str(p, wxCSConv("GB2312")); str is XX[ I am an ascii string, I am a GB2312 string ] Example 2 input: GB2312 wxString str(p, wxCSConv("UTF-8")); str is empty . I think(I want to get) the str should be XX[ I am an ...
by newage
Tue Aug 05, 2014 4:36 am
Forum: C++ Development
Topic: how to convert char* (EUR_KR) to char*(UTF-8) faster?
Replies: 2
Views: 675

how to convert char* (EUR_KR) to char*(UTF-8) faster?

Platform: windows 7 x64 GUI: wxwidgets 3.0.1 type: char* to char* encode: EUR_KR to UTF-8(or *** to UTF-8) FileSize: 43MB this is my code.(I want to do it faster) thanks //about 13ms wxFile file(openFileDialog.GetPath()); size_t dataSize = (size_t)file.Length(); char *data = (char*)malloc(dataSize);...
by newage
Fri May 16, 2014 12:10 pm
Forum: C++ Development
Topic: wxAui with wx wxPropertyGridInterface::SetSplitterLeft
Replies: 0
Views: 869

wxAui with wx wxPropertyGridInterface::SetSplitterLeft

m_PropGrid = new wxPropertyGrid(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE); m_PropGrid->SetSplitterLeft(); not float1.PNG The AuiNoteboook is not float at first.And the SetSplitterLeft of wxPropertyGrid is good. float.PNG When the AuiNoteboook is float.And the SetSplitterLeft o...