下载MetaTrader 5

源代码如下 运行出现4059错误,为什么?

要添加评论,请登录注册
加入MQL5 Cloud Network。数百万交易者们正在等候于此!
虔诚2050
29
虔诚2050 2011.06.27 16:00 

//+------------------------------------------------------------------+
//| 我的交易.mq4 |
//| Copyright ?2011, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "wenyun"
#property link "http://www.126.com/"
#include <WinUser32.mqh>
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
Print("you are the best No.1 init()");
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
Print("错误0:",GetLastError());
PlaySound("alert.wav");
Print("错误2:",GetLastError());
MessageBox("hello","world",MB_YESNO|MB_ICONQUESTION);
Print("错误1:",GetLastError());

Print("you are the best No.2 deinit()");
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
return(0);
}
//+------------------------------------------------------------------+

虔诚2050
29
虔诚2050 2011.06.27 16:01  

简化的代码如下:

#property copyright "wenyun"
#property link "http://www.126.com/"
#include <WinUser32.mqh>
int init()
{
Print("you are the best No.1 init()");
return(0);
}
int deinit()
{
Print("错误0:",GetLastError());
PlaySound("alert.wav");
Print("错误2:",GetLastError());
MessageBox("hello","world",MB_YESNO|MB_ICONQUESTION);
Print("错误1:",GetLastError());

Print("you are the best No.2 deinit()");
return(0);
}
int start()
{
return(0);
}
//+------------------------------------------------------------------+

虔诚2050
29
虔诚2050 2011.06.27 16:01  

简化的代码如下:

#property copyright "wenyun"
#property link "http://www.126.com/"
#include <WinUser32.mqh>
int init()
{
Print("you are the best No.1 init()");
return(0);
}
int deinit()
{
Print("错误0:",GetLastError());
PlaySound("alert.wav");
Print("错误2:",GetLastError());
MessageBox("hello","world",MB_YESNO|MB_ICONQUESTION);
Print("错误1:",GetLastError());

Print("you are the best No.2 deinit()");
return(0);
}
int start()
{
return(0);
}
//+------------------------------------------------------------------+

虔诚2050
29
虔诚2050 2011.06.27 16:03  

刚开始按F5编译,能跳出对话框和声音,后来就不行了。

虔诚2050
29
虔诚2050 2011.06.28 09:44  

为什么没人回答呢?

要添加评论,请登录注册