Link to home
Start Free TrialLog in
Avatar of dre7606
dre7606

asked on

DDE in Visual C++

Could some one help me "real fast" on how to implement DDE in Visual C++?
Avatar of thresher_shark
thresher_shark

I suggest you look into these functions and macros:

CDialog::DoDataExchange
BEGIN_MESSAGE_MAP
END_MESSAGE_MAP
CWnd::UpdateData

That should provide you with everything you need to implement DDE.

If you have any further questions, please feel free to ask! Thanks.
DDE is NOT Dialog Data Exchange. it is Dynamic Data Exchange - sort of OLE's predecessor. So the DoDataExchange and MESSAGE_MAPs and such are irrelevant.

I don't think there is a "real fast" way to implement DDE. But I suggest taking a look at the DDE samples that come with Visual C++. The can be located in the InfoViewer tab under SDK Samples -> Win32 Samples -> Dynamic Data Exchange Management Library
DDE will disappear soon , and will be replaced by ole2.0. so on my opinion, to pay much to learn it is worthless.
ASKER CERTIFIED SOLUTION
Avatar of Answers2000
Answers2000

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dre7606

ASKER

This site helped out a little, at least now I have an idea of how it is implemented
DDE message is included in dde.h which is found in include directory. ex)WM_DDE_INITIATE, WM_DDE_TERMINATE ...

I use this message in ON_MESSAGE(..., ...)
ex) ON_MESSAGE(WM_DDE_DATA, OnDdeData) ...
                  ....
    OnDdeData(..., ...)
    {
        ....
    }

and DDE communication use ATOM, GlobalAlloc(..), SendMessage(...)

First, write Data needed in Global memory.
Second, Send DDE Message using SendMessage function.