This example uses WinDdeRespond to respond to an initiate message (WM_DDEINITIATE) generated by the client window issuing WinDdeInitiate. Here, the server responds as a DDE Server that supports a System topic.

#define INCL_WINDDE             /* Window DDE Functions         */
#include <os2.h>

HWND  hwndClient;       /* client window                        */
HWND  hwndServer;       /* server window                        */
char  pszAppName[15]="DDE Server"; /* server application        */
char  pszTopicName[15]=SZDDESYS_TOPIC; /* topic ('System')      */
MRESULT  mresReply;     /* message return data                  */
CONVCONTEXT Context;
case WM_DDE_INITIATE:
     mresReply = WinDdeRespond(hwndClient, hwndServer, pszAppName,
                               pszTopicName, &Context);


[Back] [Next]