Looks not efficiently.leiradella wrote:What about this (untested)?
Cheers,Code: Select all
wxString ConcatArrayString(const wxArrayString& array, wxChar sep) { wxString result; for (int i = 0; i < array.GetCount(); i++) { result.Append(array.Item(i)).Append(sep); } return result; }
Andre
Search found 64 matches
- Fri Sep 11, 2009 5:20 am
- Forum: C++ Development
- Topic: How to convert wxArrayString into wxString efficiently
- Replies: 10
- Views: 2238
- Fri Sep 11, 2009 12:49 am
- Forum: C++ Development
- Topic: How to convert wxArrayString into wxString efficiently
- Replies: 10
- Views: 2238
How to convert wxArrayString into wxString efficiently
Is there any api "concating" a string array?
Code: Select all
wxString concat(const wxArrayString&,const wxChar*);
wxArrayString lines;
wxString s=concat(lines,_T("\n"));
- Tue Sep 08, 2009 12:04 am
- Forum: C++ Development
- Topic: Moving to Linux
- Replies: 19
- Views: 2900
Re: Moving to Linux
cMake will convert exists VS project to anothers? I guess it's no. You need manually write cmakelists.txt. cmake will convert cmakelists.txt into VS project or gnu makefile or codeblock project. Those projects or makefiles also use cmake as a command line tool, so those project files are dependent ...
- Sun Sep 06, 2009 11:06 am
- Forum: C++ Development
- Topic: Moving to Linux
- Replies: 19
- Views: 2900
Re: Moving to Linux
Use cmake. If you are doing the cross-platform development. You need cross-platform build tools of course. cmake will create project files for you. So the best part is you can still use your favorite develop tools ( Visual Studio, mingw, code blocks, gnu make ..) BTW: KDE also uses cmake. As for you...
- Sun Aug 30, 2009 11:19 pm
- Forum: C++ Development
- Topic: Save wxGrid values into a file, how?
- Replies: 2
- Views: 829
- Thu Aug 27, 2009 10:17 am
- Forum: C++ Development
- Topic: wxWidgets + skins = wxUniversal?
- Replies: 18
- Views: 5340
Re: wxWidgets + skins = wxUniversal?
That is quite problematic. wxSkin only draws stuff, it doesn't alter the existing widgets, so that they know about skinning. Thus you can't simply switch. I had some modification code for wxWidgets 2.6 done that allowed "sort of" that. But it never got far and I figured that maybe it would be a bet...
- Thu Aug 27, 2009 6:38 am
- Forum: C++ Development
- Topic: wxWidgets + skins = wxUniversal?
- Replies: 18
- Views: 5340
Re: wxWidgets + skins = wxUniversal?
I want to add skins support for my application. Should I use the wxUniversal or is there a better way? I use the wxSkin in my current commercial project. wxSkin is fine for a real project but need some tuning. I spent about 4 days in implementing the skin. 1. I need enable or disable skin in real t...
- Mon Aug 24, 2009 11:15 pm
- Forum: C++ Development
- Topic: OpenGL Multithreading
- Replies: 8
- Views: 3162
- Mon Aug 24, 2009 5:45 am
- Forum: C++ Development
- Topic: Unicode not working in wxWidgets GUI?
- Replies: 9
- Views: 3639
unicode chinese works fine on my computer, see attached image. You need compile wxwidgets in unicode version. Do NOT forget turn on unicode flag in your project settings. For example, if you are using visual studio 2005, pls check "project properties -> Configuration Properties -> General -> Charact...
- Wed Aug 19, 2009 3:32 am
- Forum: C++ Development
- Topic: Application Icon
- Replies: 4
- Views: 1082
You need to use a resource.rc file. Do some search on this forum, there're already plenty of posts arguing the question. Here is the code of resources.rc //see cross-platform-gui-wxwidget.pdf, search "aaaaa" aaaaa ICON "rc/appicon.ico" /* since vc2005, the compiler will automaticlaly create rc file...
- Tue Aug 11, 2009 4:43 am
- Forum: The Code Dump
- Topic: wxFlatMenu & wxFlatMenuBar
- Replies: 110
- Views: 45604
Here is the patch to make the menu send wxEVT_COMMAND_MENU_SELECTED instead popup a menu.
Usage:
Usage:
Code: Select all
wxFlatMenuBar* b;
...
wxFlatMenu* m=new wxFlatMenu(ID_FOO);
wxFlatMenuBar* b->Add(m,("blah"));
- Tue Aug 11, 2009 1:06 am
- Forum: C++ Development
- Topic: Problems with threads
- Replies: 18
- Views: 2928
some suggestions: 1. don't use thread. use timer if possible. 2. use multi-process instead multi-thread, just as google chrome has done. 3. from your description of problem,maybe there are some memory problem, use wxSharedPtr (if you are using 2.8.10 or lower, you need copy sharedptr.h, atomic.h fro...
- Tue Aug 11, 2009 12:12 am
- Forum: C++ Development
- Topic: how to change the look of button in wxFilePickerCtrl
- Replies: 3
- Views: 854
I solved the problem. Here is the code. The code just implement a very simple filepicker control and it's easy to change the apperance of control (using wxSkin, for example). //MyFilePickerCtrl.h #ifndef _MY_FILE_PICKER_CTRL_H #define _MY_FILE_PICKER_CTRL_H class CMyFilePickerCtrl:public wxPanel { p...
- Fri Aug 07, 2009 1:04 am
- Forum: C++ Development
- Topic: Trouble with wxProcess/wxExecute and the output...
- Replies: 2
- Views: 793
Here is the code. BTW, try to use google code search. //use wxProcess class CPipedProcess:public wxProcess { DECLARE_DYNAMIC_CLASS(CPipedProcess) wxWindow* _parent; public: CPipedProcess(wxWindow* parent) { wxASSERT(parent); _parent=parent; //turn on redirect Redirect(); } bool read_process_output()...
- Thu Aug 06, 2009 11:55 pm
- Forum: C++ Development
- Topic: how to change the look of button in wxFilePickerCtrl
- Replies: 3
- Views: 854