Solved

DDE in Visual C++

Posted on 1998-09-25
6
1,629 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

776 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