Solved

DDE in Visual C++

Posted on 1998-09-25
6
1,620 Views
Last Modified: 2013-11-20
Could some one help me "real fast" on how to implement DDE in Visual C++?
0
Comment
Question by:dre7606
6 Comments
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1322622
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.
0
 
LVL 2

Expert Comment

by:prasanth
ID: 1322623
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
0
 
LVL 3

Expert Comment

by:zhongbing
ID: 1322624
DDE will disappear soon , and will be replaced by ole2.0. so on my opinion, to pay much to learn it is worthless.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 8

Accepted Solution

by:
Answers2000 earned 100 total points
ID: 1322625
I didn't think it will disappear, it's just becoming _not_the_recommended_way_ to drive MS  apps.  Plenty of non-MS apps may well keep using it.  There are legacy functions to much older versions of Windows that still live on the API, though strictly speaking MS might consider them "obsolete".

As far as a quick implementation of DDE code

1. C++ (MFC) code
Julian Smart has some classes on the net
http://web.ukonline.co.uk/Members/julian.smart/code.html

I can't vouch for them, as I used approach #2 below, but his other stuff seems to be reasonably good


2. C Code (SDK) style code
Look on MSDN CD-ROM for DDE articles by "Herman Rodent".  I seem to recall these are 16 bit - but I ported them in a project to 32 bit and it was easy (< 1 day) - and they also mixed fine with MFC code in same project.

0
 

Author Comment

by:dre7606
ID: 1322626
This site helped out a little, at least now I have an idea of how it is implemented
0
 

Expert Comment

by:TheGod
ID: 1322627
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.

   
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now