简化的代码如下:
#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);
}
//+------------------------------------------------------------------+
简化的代码如下:
#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);
}
//+------------------------------------------------------------------+
刚开始按F5编译,能跳出对话框和声音,后来就不行了。
为什么没人回答呢?
//+------------------------------------------------------------------+
//| 我的交易.mq4 |
//| Copyright ?2011, MetaQuotes Software Corp. |
//| https://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);
}
//+------------------------------------------------------------------+