more C++ example

How to create strategies and indicators
Message
Author
FinGeR
Posts: 72
Joined: Wed Apr 23, 2008 12:24 pm

more C++ example

#1 Postby FinGeR » Mon Aug 04, 2008 2:41 pm

hello,

possible more example c++

regards

FinGeR
Posts: 72
Joined: Wed Apr 23, 2008 12:24 pm

#2 Postby FinGeR » Mon Aug 04, 2008 3:00 pm

c++ sample

I look for

Code: Select all

string substr=StringSubstr(Symbol(), 6, 1);


Code: Select all

MessageBox(" function returned the "+GetLastError()+" error\nContinue?", "Question", MB_YESNO|MB_ICONQUESTION);


regards

User avatar
Terranin
Site Admin
Posts: 833
Joined: Sat Oct 21, 2006 4:39 pm

#3 Postby Terranin » Mon Aug 04, 2008 4:12 pm

FinGeR wrote:c++ sample

I look for

Code: Select all

string substr=StringSubstr(Symbol(), 6, 1);


Code: Select all

MessageBox(" function returned the "+GetLastError()+" error\nContinue?", "Question", MB_YESNO|MB_ICONQUESTION);


regards


So, what is the question?
Hasta la vista
Mike

FinGeR
Posts: 72
Joined: Wed Apr 23, 2008 12:24 pm

#4 Postby FinGeR » Mon Aug 04, 2008 5:38 pm

I would want

1. MessageBox on chart with YES and NO Button

2. subtracted string or char
(like MQL4 Function StringSubstr( string text, int start, int length=0) )

thanks

regards

User avatar
Terranin
Site Admin
Posts: 833
Joined: Sat Oct 21, 2006 4:39 pm

#5 Postby Terranin » Tue Aug 05, 2008 8:18 am

FinGeR wrote:I would want

1. MessageBox on chart with YES and NO Button

2. subtracted string or char
(like MQL4 Function StringSubstr( string text, int start, int length=0) )

thanks

regards


1. You can do it like this:

Code: Select all

Pause();
MessageBox(NULL, "Some info", "Caption", MB_YESNO);
Continue();


Pause will pause execution until you call Continue, giving you time to work with message box.

2. I am not familiar how C++ works with strings, if you are C++ programmer you can do it by yourself. Just use regular C++ functions and conversions char* <--> string.
Hasta la vista

Mike

FinGeR
Posts: 72
Joined: Wed Apr 23, 2008 12:24 pm

#6 Postby FinGeR » Tue Aug 05, 2008 8:29 am

Thanks

User avatar
Terranin
Site Admin
Posts: 833
Joined: Sat Oct 21, 2006 4:39 pm

#7 Postby Terranin » Tue Aug 05, 2008 9:13 am

FinGeR wrote:Thanks


Sorry, there was not "Continue()" in previous example but "Resume()".
Hasta la vista

Mike


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 20 guests