Adding Dialogbox to MT4 SampleDLL

 

Hello,

I would like to be able to add a dialog box to the Windows DLL that was produced by the sample included in MT4. I was able to create the ExpertSample.DLL using VC 6++ and making a Win32 Dynamic_link Library project. Can a dialog box resource be added to the dll and then displayed on a MT4 chart? And, can the results otained from the dialog be returned to the MT4 EA?

I have searched the Internet extensively, and found articles about Widows andMFC DLLs, using VC++, Pascal, .NET, and VB. None of the examples shown dealt with MT4. I've seen examples on different forums showing dialog boxes on charts, but neither Metaquotes or MetaTrader have documentation available. The more time I work on this issue, the more confused I get.

Can someone give me instructions on how to integrate dialog boxes into MT4, or tell me where I can get documentation with concrete examples?!

Any assistance would be much appreciated!

Regards,

-Frank

 
fmuir:

Hello,

I would like to be able to add a dialog box to the Windows DLL that was produced by the sample included in MT4. I was able to create the ExpertSample.DLL using VC 6++ and making a Win32 Dynamic_link Library project. Can a dialog box resource be added to the dll and then displayed on a MT4 chart? And, can the results otained from the dialog be returned to the MT4 EA?

I have searched the Internet extensively, and found articles about Widows andMFC DLLs, using VC++, Pascal, .NET, and VB. None of the examples shown dealt with MT4. I've seen examples on different forums showing dialog boxes on charts, but neither Metaquotes or MetaTrader have documentation available. The more time I work on this issue, the more confused I get.

Can someone give me instructions on how to integrate dialog boxes into MT4, or tell me where I can get documentation with concrete examples?!

Any assistance would be much appreciated!

Regards,

-Frank

What you need is WinAPI programming. There's a risk showing that on chart, it may slow down MT4 displaying chart, so you should only displaying that WinAPI thing only.

You said other forums, is there any example from there that you can use ?, or at least give us a link here to that forum you talking about.

The safe way is using MT native way, like using script with extern input, pass its extern values to MT4 GlobalVariable() and whatever CI or EA read from that GlobalVariable() .

You may also want to try MT4 from ibfx.au and attach IBFX trade terminal EA and see for yourself

 
onewithzachy:

What you need is WinAPI programming. There's a risk showing that on chart, it may slow down MT4 displaying chart, so you should only displaying that WinAPI thing only.

You said other forums, is there any example from there that you can use ?, or at least give us a link here to that forum you talking about.

The safe way is using MT native way, like using script with extern input, pass its extern values to MT4 GlobalVariable() and whatever CI or EA read from that GlobalVariable() .

You may also want to try MT4 from ibfx.au and attach IBFX trade terminal EA and see for yourself

Hello Zach,

Thanks for the response! Your correct in suggesting WinAPI programming. That's what I'd like to use, but the MT4 platform doens't even support that. The statements available for MT4 programming is a very small subset of WinAPI. I'd like to develop a external dll (that could have access to the whole API) that I could attach to the platform (like Metaquote does), that would allow me to attach and display a customized dialog box on a chart This dialog box will allow somebody to visually make decisions for an EA before any orders are submitted.

I currently have an account with IBFX(US). Their MT4 platform, as well as the one you sent me a pic of, could of, and have, been loaded with dialog boxes by Metaquotes. Dialog boxes can be any size. What's good for the goose is also good for the gander!

I see that Metaquotes (probably) added an article this thread that suggests object-oriented programming. I haven't read it yet, but I will

I'm still plexed about the nuts and bolts of getting a dialog resource in a dll to interact with a MT4 Ea

Thanks again

-Frank

 
I'm not so sure what kind of dialog boxes that you have in mind - hopefully not the one that ibfx show, that will be long explanation how to do it, however since you gonna writing it in dll - and if any other forumers may interested - MSDN's Dialog Boxes is good place to start http://msdn.microsoft.com/en-us/library/windows/desktop/ms632588(v=vs.85).aspx
 
fmuir:


I see that Metaquotes (probably) added an article this thread that suggests object-oriented programming. I haven't read it yet, but I will

Read it by all means . . . but the link to articles that Metaquotes add are random and change if you refresh the page . . .
 
onewithzachy:
I'm not so sure what kind of dialog boxes that you have in mind - hopefully not the one that ibfx show, that will be long explanation how to do it, however since you gonna writing it in dll - and if any other forumers may interested - MSDN's Dialog Boxes is good place to start https://www.mql5.com/go?link=https://msdn.microsoft.com/en-us/library/windows/desktop/ms632588(v=vs.85).aspx

onewithzachy,

Thanks for the link. It's been bookmarked. I was refering to all those little floating boxes on the screen. They are dialog boxes too.

Frank

 
RaptorUK:
Read it by all means . . . but the link to articles that Metaquotes add are random and change if you refresh the page . . .


RaptorUK,

Thanks for the info about the link to articles displayed on the page. It was bookmarked when I saw it the first time. I am able to retrieve it at my convenience.

-Frank

 
onewithzachy:
I'm not so sure what kind of dialog boxes that you have in mind - hopefully not the one that ibfx show, that will be long explanation how to do it, however since you gonna writing it in dll - and if any other forumers may interested - MSDN's Dialog Boxes is good place to start https://www.mql5.com/go?link=https://msdn.microsoft.com/en-us/library/windows/desktop/ms632588(v=vs.85).aspx


onewithzachy,

The link that you provided looks like it will be a goldmine of good information about dealing with Windows Dialog Boxes. I am going to be looking at it with a focus on Win32 Programming. I had been entertaining the idea of using MFC or C++, however, the application that I will use the dialog box with is written in good old "C." Thanks again,

-Frank

Reason: