Search found 85 matches

by rafae11
Wed Aug 15, 2012 8:35 am
Forum: C++ Development
Topic: populate wxchoice
Replies: 2
Views: 930

populate wxchoice

i have some items i need to populate a drop down list. a01 a02 it can only be loaded after they have been detected. how do i add the strings above into a wxchoice? m_Channel->SetString(0,channel.c_str()); m_Channel->SetString(1,channel.c_str()); the code i tried does not work could somebody let me k...
by rafae11
Wed Aug 08, 2012 3:36 pm
Forum: C++ Development
Topic: string extraction
Replies: 3
Views: 939

Re: string extraction

Thanks for your help i just used this method.

Code: Select all

wxString T_streamtemp = stream.AfterFirst('=') ;
T_stream << T_streamtemp.BeforeFirst('\x0D');
by rafae11
Wed Aug 08, 2012 1:35 pm
Forum: C++ Development
Topic: string extraction
Replies: 3
Views: 939

string extraction

i have a wxstring that outputs these values.
each line varies in length.
i want to extract the numeric characters only of each line.

for example t=24.9 would become 24.9

how would i do this?

T=24.9
P= 3117
X=0.858
Y=-0.437
Z=-0.050
0=-0.008
S=3.287
R=2.492
B= 8.439
by rafae11
Tue Aug 07, 2012 10:41 pm
Forum: C++ Development
Topic: wxGrid with MS Excel (copy/paste)
Replies: 3
Views: 1775

Re: wxGrid with MS Excel (copy/paste)

i managed to get it to work.
my problem now is how do i suppress the error when i copy from clipboard and the cells do not match.
i have a 6 x10 grid. and i pasted it on the 2nd row instead of the 1st row and i get the error message.
by rafae11
Tue Aug 07, 2012 3:52 pm
Forum: C++ Development
Topic: wxGrid with MS Excel (copy/paste)
Replies: 3
Views: 1775

wxGrid with MS Excel (copy/paste)

i copied and pasted the code below to a .h and a .cpp file. how do i incorporate the code below with an existing grid. I wish to copy and paste data from my grid to excel. please help i'm a beginner. thanks //mygrid.h /******************************************************************************/ #...
by rafae11
Fri Aug 03, 2012 11:51 am
Forum: C++ Development
Topic: error saving file.
Replies: 2
Views: 1680

Re: error saving file.

thanks

i just added file.create();
before file.open();
the message doesn't appear anymore.
by rafae11
Fri Aug 03, 2012 11:10 am
Forum: C++ Development
Topic: error saving file.
Replies: 2
Views: 1680

error saving file.

hi when the file does not exist and i try to create it
I get this message.
how do i disable this box from showing up?
1.png
1.png (12.79 KiB) Viewed 1680 times
by rafae11
Wed Aug 01, 2012 11:11 am
Forum: C++ Development
Topic: wxthread
Replies: 5
Views: 1114

Re: wxthread

if ( (x != z) && (buffer[0] != '\x02' ) && (buffer[buffer.size()-1] != '\x03') && (buffer[1] != '1') && (buffer[2] != '6')) { stream.clear(); stream << "Log Counts\n" << "Error with transmitted file\n\n"; f.str = stream.Clone(); ::wxPostEvent(m_parent, f); //stop thread } else { // continue } i hav...
by rafae11
Tue Jul 31, 2012 11:37 am
Forum: C++ Development
Topic: wxTextFile size of file.
Replies: 2
Views: 646

Re: wxTextFile size of file.

thanks
by rafae11
Tue Jul 31, 2012 10:47 am
Forum: C++ Development
Topic: wxTextFile size of file.
Replies: 2
Views: 646

wxTextFile size of file.

i am using wxTexfile to save my data to a text file.
what command do i use to get the size of file?
by rafae11
Fri Jul 27, 2012 12:40 pm
Forum: C++ Development
Topic: wxthread
Replies: 5
Views: 1114

Re: wxthread

how do i transfer the information from a thread to a progress bar ? i was trying to run this progress bar code it runs but when i press cancel the program crashes. #include <wx/wx.h> #include <wx/progdlg.h> class myApp : public wxApp { public: bool OnInit(void); int OnExit(void); }; IMPLEMENT_APP(my...
by rafae11
Tue Jul 24, 2012 3:31 pm
Forum: C++ Development
Topic: wxthread
Replies: 5
Views: 1114

wxthread

I have a function that transmits and receives data via serial port. when I run the function my program freezes and i can't do anything until the transmission is finished. I wish to implement this function inside a thread. where do i put the code for my function? MyThread *thread = CreateThread(); if...
by rafae11
Mon Jul 16, 2012 11:35 am
Forum: C++ Development
Topic: Image in Htmlprint
Replies: 9
Views: 1819

Re: Image in Htmlprint

i can print images now with

Code: Select all

wxStandardPaths paths = wxStandardPaths::Get();
paths.DontIgnoreAppSubDir();
wxString newPath = paths.GetDataDir();
newPath << "\\x.bmp";
thanks for help.
by rafae11
Wed Jul 11, 2012 9:52 am
Forum: C++ Development
Topic: Image in Htmlprint
Replies: 9
Views: 1819

Re: Image in Htmlprint

without the \\ the compiler tells me its an unrecognized character escape sequence.
by rafae11
Wed Jul 11, 2012 8:43 am
Forum: C++ Development
Topic: Image in Htmlprint
Replies: 9
Views: 1819

Re: Image in Htmlprint

wxString exePath = wxStandardPaths::Get().GetDataDir(); I used the code and it gives me the path of the executable which is m_impl = "c:\Users\Home\Documents\Visual Studio 2008\Projects\s0015\wxwidgets" How do i add additional \ to the path so it becomes m_impl = "c:\\Users\\Home\\Documents\\Visual...