Solved

DDE in Visual C++

Posted on 1998-09-25
6
1,633 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
xyBalance chalenge 58 96
building a service to accessed via telnet client, want colors ? 4 94
Unix Command -- Challenging  question 7 96
x-bar in Google Sheets 2 72
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

830 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