Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DDE in Visual C++

Posted on 1998-09-25
6
Medium Priority
?
1,649 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
LVL 8

Accepted Solution

by:
Answers2000 earned 200 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

722 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