Search found 178 matches

by orbitcowboy
Fri Oct 16, 2009 12:52 pm
Forum: C++ Development
Topic: deprecated conversion from string constant to ‘wxChar*’
Replies: 6
Views: 2886

deprecated conversion from string constant to ‘wxChar*’

Hello, compiling my code with g++-4.3.3 on Ubuntu linux prints the following compiler warning: deprecated conversion from string constant to ‘wxChar*’ The code g++ warns about: static wxChar *Cmd[] = {wxT("some text"),NULL}; What i am doing wrong. Or, in other words, how to do it correctly...
by orbitcowboy
Thu Sep 24, 2009 1:05 pm
Forum: wxDev-C++
Topic: plotctrl example
Replies: 2
Views: 1614

try to link against the wxPlotCtrl library: i am using the following linker flags and plotctrl works for me -I/usr/include/gtk-2.0/gdk -I/usr/include/gtk-2.0/gtk -L/usr/local/lib -pthread -lwx_gtk2_aui-2.8 -lwx_gtk2_xrc-2.8 -lwx_gtk2_qa-2.8 -lwx_gtk2_html-2.8 -lwx_gtk2_adv-2.8 -lwx_gtk2_core-2.8 -lw...
by orbitcowboy
Tue Sep 22, 2009 5:52 pm
Forum: wxDev-C++
Topic: wxPlotCtrl
Replies: 2
Views: 1318

i would prefer to use wxMathPlot. Its even better, but this is my opinion, only :-)
by orbitcowboy
Thu Sep 17, 2009 10:32 pm
Forum: wxDev-C++
Topic: help WxTreeCtrl
Replies: 1
Views: 1335

http://docs.wxwidgets.org/stable/wx_sam ... letreectrl

you find the sample in the wxWidgets sources in samples/treectrl

Best regards

Orbitcowboy
by orbitcowboy
Thu Sep 17, 2009 2:15 pm
Forum: wxCode
Topic: invalid conversion from 'const char*' to 'wxChar'
Replies: 8
Views: 6341

You're right, I have to rebuild it in ansi mode, but I don't know how I should do that. Sorry, if I'm asking stupid Questions... No problem (in linux :-) ... others i don't know): Download the wxWidgets sources from: http://www.wxwidgets.org/downloads/ then, type the following commands in the linux...
by orbitcowboy
Thu Sep 17, 2009 1:45 pm
Forum: wxCode
Topic: invalid conversion from 'const char*' to 'wxChar'
Replies: 8
Views: 6341

Thank you for the fast reply, but is there another way to solve this problem, cause it's to much to change in the program code (there are a lot of files to changed!). Yes, there is another way. Compile your application in ansi and NOT in uncicode mode using the wx-config --unicode=no. This requires...
by orbitcowboy
Thu Sep 17, 2009 12:59 pm
Forum: wxCode
Topic: invalid conversion from 'const char*' to 'wxChar'
Replies: 8
Views: 6341

Hi, you are compiling in unicode mode. This requires wxT() macros when using char*. #include "GUI.h" #include "Case.h" #include "Color_Key.h" #include "wx/bitmap.h" IMPLEMENT_APP(GUI) wxApp * theApp = &wxGetApp(); bool GUI::OnInit() { add_case(); return tr...
by orbitcowboy
Wed Sep 16, 2009 3:18 pm
Forum: C++ Development
Topic: wxString to float conversion
Replies: 6
Views: 2872

Hm, I don't know where your error lies, because I do not see the full code, but quick solution for this would be: double d1 = ay[p][0]; double d2 = ay[p][1]; GetCellValue(p,0).ToDouble(&d1); GetCellValue(p,1).ToDouble(&d2); hey thanks for your help. I think the wxString GetCellValue(int r, ...
by orbitcowboy
Tue Sep 15, 2009 2:13 pm
Forum: C++ Development
Topic: wxGrid: SetCellValue(&int, &int, &wxString)
Replies: 2
Views: 1387

have you tried to following:

Code: Select all

wxGrid *pGrid = new Grid(...)
int row,col;
/// ...
pGrid-> SetCellValue(row,col,wxString::Format(wxT("%f"),myFloatValue)); 
Best regards

Orbitcowboy
by orbitcowboy
Mon Sep 14, 2009 7:13 am
Forum: C++ Development
Topic: math with more than 64bit precision?
Replies: 14
Views: 5930

Well, I could find this: http://www.delphi3000.com/articles/article_3772.asp?SK= , it does 128-bit arithmetic using 32-bit registers but it's written in Pascal. I think it's pretty easy to convert the functions to C plus inline assembly. Cheers, Andre That link is very helpful. I can understand the...
by orbitcowboy
Sun Sep 13, 2009 8:37 pm
Forum: C++ Development
Topic: math with more than 64bit precision?
Replies: 14
Views: 5930

Hi friends

here

http://en.wikipedia.org/wiki/Arbitrary- ... arithmetic

you find other bignum libraries beyond gmp :-)

Best regards

Orbitcowboy
by orbitcowboy
Fri Aug 21, 2009 4:13 pm
Forum: C++ Development
Topic: try catch when allocation memory
Replies: 4
Views: 1665

try catch when allocation memory

Hello friends, when using the new operator, normally one whould write the following code #include <iostream> #include <new> using namespace std; int main () { int* myarray; try { myarray= new int[10000]; if(myarray == NULL) cerr << "bad alloc\n" << endl; } catch (bad_alloc& ba) { cerr ...
by orbitcowboy
Thu Jul 16, 2009 12:40 pm
Forum: C++ Development
Topic: wxGTK::add an icon to wxMenu Item
Replies: 2
Views: 1542

Many thanks, i was not aware of wxMenuItem class. Its exactly what i need.
by orbitcowboy
Thu Jul 16, 2009 7:40 am
Forum: C++ Development
Topic: wxGTK::add an icon to wxMenu Item
Replies: 2
Views: 1542

wxGTK::add an icon to wxMenu Item

Hi friends,

does anybody know a way to add an icon to wxMenu? Is this possible with wxGTK?

I intend to do something like this--> see screenshot

Best regards and thanks in advance

Orbitcowboy