Search found 178 matches

by orbitcowboy
Sun Jun 28, 2009 8:26 pm
Forum: C++ Development
Topic: A Color Box
Replies: 1
Views: 484

Hello,

maybe this helps you:

http://docs.wxwidgets.org/stable/wx_wxc ... pickerctrl

Best regards

Orbitcowboy
by orbitcowboy
Sat Jun 27, 2009 4:46 pm
Forum: C++ Development
Topic: Clock/Time Control?
Replies: 2
Views: 520

Hello,

maybe this thread helps you:

http://forums.wxwidgets.org/viewtopic.p ... highlight=

best regards

Orbitcowboy
by orbitcowboy
Sat Jun 27, 2009 1:11 pm
Forum: The Code Dump
Topic: wxGrid class extended
Replies: 5
Views: 6759

Hello,

i have tested the wxEgrid class on Ubuntu Linux with wxGTK-2.8.9 (svn-head). It made some little adjustment, because g++ raised a lots of warnings. These are fixed now.
I have attached a linux makefile an the modified source.

Best regards

Orbitcowboy
by orbitcowboy
Mon Jun 22, 2009 2:12 pm
Forum: C++ Development
Topic: how to create an unicode string that contains a special char
Replies: 3
Views: 1479

Ok,

thank you very much!

Best regards

Orbitcowboy
by orbitcowboy
Mon Jun 22, 2009 11:54 am
Forum: C++ Development
Topic: how to create an unicode string that contains a special char
Replies: 3
Views: 1479

i found a possible way by myself:

Code: Select all

wxString(std::string("[°]").c_str(),wxConvUTF8)
Is there an easier way? Is this way plattformindependant?
by orbitcowboy
Mon Jun 22, 2009 10:04 am
Forum: C++ Development
Topic: how to create an unicode string that contains a special char
Replies: 3
Views: 1479

how to create an unicode string that contains a special char

Hi friends, i tried to create a wxString object that contains a special character, lets say the degree sign ("°"). g++-4.3.3. says: The compiler message: ...error: converting to execution character set: Invalid or incomplete multibyte or wide character The string i tried to create: wxString s(wxT("[...
by orbitcowboy
Wed Jun 10, 2009 12:44 pm
Forum: C++ Development
Topic: wxPlotCtrl
Replies: 2
Views: 677

Re: wxPlotCtrl

<!-- --><!-- --><!-- --> I am using wxPlotCtrl for the plots. Can I plot dotted lines instead of solid lines? Any ideas Please? Hello rangana, this code snippet might help you wxPlotctrl *m_pPlotCtrl = new wxPlotCtrl(this,id,wxPoint(0,0),wxSize(225,300)); /// set up plotctrol params m_pPlotCtrl->Set...
by orbitcowboy
Tue Jun 09, 2009 10:56 pm
Forum: C++ Development
Topic: Redraw curve on wxPlotCtrl
Replies: 2
Views: 650

Hi,

maybe this thread helps you:

http://forums.wxwidgets.org/viewtopic.p ... t=plotctrl

Best regards and good luck!

Orbitcowboy
by orbitcowboy
Fri Jun 05, 2009 11:05 am
Forum: C++ Development
Topic: How to print Unicode(wchar) characters to console
Replies: 5
Views: 1799

Have you tried wxString msg(wxT("欢迎来到中国!")); std::cout << msg.mb_str() << std::endl; Thank you so much for your help. The above code works. But I am curious now isn't there such an equivalent method in wxWidgets?One has no other choice to do such task except importing std namespace? Regards, Sam I ...
by orbitcowboy
Fri Jun 05, 2009 8:01 am
Forum: C++ Development
Topic: How to print Unicode(wchar) characters to console
Replies: 5
Views: 1799

Have you tried

Code: Select all

wxString msg(wxT("欢迎来到中国!")); 
std::cout << msg.mb_str() << std::endl;

this?

On linux, it works fine (Ubuntu -Jaunty, g++-4.4.0).
Sorry, i have no windows to try.

Regards

Orbitcowboy
by orbitcowboy
Thu May 28, 2009 6:14 pm
Forum: Open Discussion
Topic: metaprogramming question
Replies: 8
Views: 1965

May be, you should try something like this: #include <iostream> using namespace std; enum P { MODE1 = 0 ,MODE2 }; class X { public: static inline const P get_mode() {return m_ ;} static inline void set_mode(const P& new_){m_=new_ ;} static P m_; }; P X::m_=MODE1; template <typename T, const P> T _S...
by orbitcowboy
Thu May 28, 2009 3:04 pm
Forum: Open Discussion
Topic: metaprogramming question
Replies: 8
Views: 1965

<!-- -->Thanks for responding to this topic! In other words, you are trying to avoid checking value of X::m_ during run-time, am I right? Yes, you are right. Moreover, you wish to have possibility to change this value during run-time. It seems to me imposible. (Maybe in some special cases this can b...
by orbitcowboy
Thu May 28, 2009 10:05 am
Forum: Open Discussion
Topic: metaprogramming question
Replies: 8
Views: 1965

metaprogramming question

Hello friends, i know its an offtopic question. But there are a lots of cpp-programmers here and i faced a problem with template metaprogramming techniques. I have simplified the problem into a little testcase: #include <iostream> using namespace std; enum P { MODE1 = 0 ,MODE2 }; class X { public: s...
by orbitcowboy
Fri May 15, 2009 9:53 am
Forum: C++ Development
Topic: c++ const reference question
Replies: 2
Views: 630

c++ const reference question

Hi friends, maybe it is a stupid question, but what is the difference between the two parameters of Foo1 and Foo2? Or, does it the same? template <typename T> T Foo1(const T & val) { //... return val; } template <typename T> T Foo2(T const & val) { //... return val; } Both functions have (to my mind...
by orbitcowboy
Mon May 11, 2009 7:17 am
Forum: C++ Development
Topic: wxAboutDialogInfo
Replies: 5
Views: 875

<!-- --> But wxAboutBox() is static function, So I dont think that I can derive a class from it. Maybe wxGenericAboutDialog helps you here. wxGTK-2.8.10/include/wx/generic/aboutdlgg.h You can derive from this class Best regards Orbitcowboy