1. No. DDE is a protocol. If you're a client, you have to observe the protocol. Pay attention to memory management. You can leak tons of memory if you're not careful.
3. Be careful. DDE is an old (Windows 3.0) technology. MSDN has been trimmed over the years, so you may get more information from an old MSDN CD from the 90s.
To get practical, to retrieve market prices from MetaTrader 4, the following piece of code is to be used (on excel) : =MT4|BID!EURUSD
This will stream to excel every market price tick for EURUSD.
Also I have Metatrader4 installed and launched from "C:\MT4\MT4.exe"
Looking at the MSDN, to initiate conversation with MetaTrader4 (or any other software), they give the following example:
The following piece of code is the most interest for me for now:
SendMessage((HWND) HWND_BROADCAST, // broadcasts message
WM_DDE_INITIATE, // initiates conversation
(WPARAM) hwndClientDDE, // handle to client DDE window
MAKELONG(atomApplication, // application-name atom
atomTopic)); // topic-name atom
I do understand the purpose of this function, I do not know what kind of info, and in which format I should replace "hwndClientDDE", "atomApplication", and "atomTopic".
You need to tell the server what you're interested in. The way you pass a string in is to make an atom that has MT4|BID!EURUSD as its value and pass that in.
On the MSDN about DDEML I have "Existing applications using the message-based DDE protocol are fully compatible with those that use the DDEML; that is, an application using message-based DDE can establish conversations and perform transactions with applications using the DDEML"
I wonder if this mean that I can through my C++ software communicate in "DDEML" with a DDE server ?
If yes will learn that instead, it seems far more documented...