Forex



Go Back   Forex Trading > Programming > MetaTrader
Forex Forum Register More recent Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-26-2008, 08:32 AM
Kikousi's Avatar
Junior Member
 
Join Date: Nov 2008
Posts: 6
Kikousi is on a distinguished road
MessageBox() <---

I'm sorry to say that my Japanese english is not appropriate.

WinUser 32 stops working when MessageBox function is called from.

Please let me know how to run Win32 with MessageBox function.
otherwise, is there any alternative function for MessageBox's one.

I look forward to hearing from you. Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 11-26-2008, 08:56 AM
Administrator
 
Join Date: Sep 2005
Posts: 20,083
Blog Entries: 243
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
dll is allowed in Metatrader's settings?

dll_import.jpg

Also you can use
bool IsDllsAllowed( ) function to check it:

Code:
#import "user32.dll"
     int     MessageBoxA(int hWnd, string szText, string szCaption,int nType);
  ...
  ...
  if(IsDllsAllowed()==false)
    {
     Print("DLL call is not allowed. Experts cannot run.");
     return(0);
    }
  // expert body that calls external DLL functions
  MessageBoxA(0,"an message","Message",MB_OK);
Also open MetaEditor, write
MessageBox
and check all the links as a help:

MetaEditor_dllimport.jpg
__________________
My blog on TSD
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 11-26-2008, 09:09 AM
Administrator
 
Join Date: Sep 2005
Posts: 20,083
Blog Entries: 243
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
And you can go to Metaquotes website to search about MessageBox.

I saw some script here with MessageBox function:

/
Code:
/----
#include <stdlib.mqh>
#include <WinUser32.mqh>
and

Code:
msg = msg +
          "    Slippage "  +DoubleToStr(Slippage,   0)  +"\n"+
          "Risk amount "   +DoubleToStr(RiskAmount, 2)  +" " +AccountCurrency()+
          "    ("+DoubleToStr(100.0 * RiskAmount / AccountFreeMargin(), 2)+"%)"+" ?";
          if(MessageBox(msg, "Buy/Sell script", MB_YESNO|MB_ICONEXCLAMATION) != IDYES) {
            return(1);
          }

And on this page you will see description of this function and example: Common Functions - Standard Functions - MQL4 Tutorial

Or maybe ... you simple forgot to add
#include <WinUser32.mqh>

About alternative function so please read this article:
http://articles.mql4.com/374
__________________
My blog on TSD
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 11-26-2008, 09:14 AM
Administrator
 
Join Date: Sep 2005
Posts: 20,083
Blog Entries: 243
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
And go to Metaquotes website MessageBox - MQL4: search and check everything:

messageboxlinks.jpg
__________________
My blog on TSD
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 11-26-2008, 10:20 AM
Kikousi's Avatar
Junior Member
 
Join Date: Nov 2008
Posts: 6
Kikousi is on a distinguished road
Thanks and further question

Dear Mr. Newdigital,

I very much appreciate all your help.
In this connection, as you understand well that EA stops normally until our further instruction such as “Yes” or “No”.

My question is :
I would like EA continue all the time without stops during Messagebox function’s running.

I thank you in advance for your kindest understanding of the above.
many thaks and best regards,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 11-26-2008, 10:32 AM
Administrator
 
Join Date: Sep 2005
Posts: 20,083
Blog Entries: 243
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
I do not know sorry ...
You can use alternative functions for example.
__________________
My blog on TSD
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 11-26-2008, 10:54 AM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
The nature of any MessageBox call in any windows application is to halt execution of the program until some user input is given. If you want execution to continue you might want to look at writing a comment or print statement.

Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV
ForexArea.com
Users of Gap Trader from 'Forex-Assistant' MUST Read This
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #8 (permalink)  
Old 11-26-2008, 12:39 PM
Kikousi's Avatar
Junior Member
 
Join Date: Nov 2008
Posts: 6
Kikousi is on a distinguished road
Thank you very mauch!

Gentlemen,

I wish to express my deepest appreciation for your prompt reply and help.

If I have any further question, I shall be grateful to you if you would kindly answer to me.

Best regards,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT. The time now is 09:59 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.