The information in this article applies to:
SUMMARY
CDDEML is a set of two sample applications that demonstrate a DDEML client
and a DDEML server. They are written using the Microsoft Foundation Class
Libraries (MFC) and define new classes for handling DDEML.
http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. MORE INFORMATIONThis sample contains two applications that demonstrate a DDEML server and DDEML client in MFC applications. This sample defines four new classes to help implement the DDEML support. These classes are: CDDEClientThe CDDEClient and CDDEServer classes encapsulate the functionality of a DDEML client or server. CDDEClientConv and CDDEServerConv encapsulate individual conversations that are managed by the CDDEClient or CDDEServer class. The CDDEClient and CDDEServer classes maintain a map of the current conversations according to the conversations handle. Using this map, the server or client can look up any ongoing conversation based on its handle. These classes were designed to implement DDEML in a very general way. As a result, these classes don't do much by themselves; they are designed to be reused in an application by deriving from each of these classes. Typically, an application derives one class from CDDEClient or CDDEServer. This derived class contains details such as what conversations are supported and how to handle callbacks that do not relate to a specific conversation. Usually there is only one instance of this class in an application. An application may derive many classes from CDDEClientConv or the application supports. These derived classes implement how each conversion handles callbacks. They also may contain buffers to store data from the conversation, or pointers to other objects that they need to communicate with. This sample contains a client and server application built using the classes mentioned above. One difficulty in writing DDEML classes is how to handle the DDEML callback function. In this sample, the DDEML callback function is contained in the CDDEClient or CDDEServer class. The callback function first checks to see whether the transaction is for the client or server, or for one of the conversations. If it is for the client or server, then the callback function calls the member function that handles that transaction. If the transaction is for a conversation, then the callback function looks up the pointer to the conversation object using the handle of the conversation in the conversation map. Then it calls the member function of the conversation that handles that transaction. Therefore, by using these classes, an application developer does not need to write a DDEML callback function. Additional query words: 3.00 3.10 softlib CDDEML.EXE
Keywords : kbfile kbprg kbsample kbDDE kbGrpUser kbUser |
Last Reviewed: December 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |