A DDE application (client or server) posts a WM_DDE_TERMINATE message to terminate a conversation.
WM_DDE_TERMINATE
wParam = (WPARAM) hwnd; // handle of posting window
lParam = 0; // not used, must be zero
Posting
The client or server application posts the WM_DDE_TERMINATE message by calling the PostMessage function, not the SendMessage function.
While waiting for confirmation of the termination, the posting application should not post any other messages to the receiving application. If the sending application receives messages (other than WM_DDE_TERMINATE) from the receiving application, it should delete any atoms or shared memory objects accompanying the messages, except hData objects associated with WM_DDE_POKE or WM_DDE_DATA messages that do not have the fRelease flag set.
Receiving
The client or server application should respond by posting a WM_DDE_TERMINATE message.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in dde.h.
Dynamic Data Exchange Overview, Dynamic Data Exchange Messages, PostMessage, SendMessage, WM_DDE_DATA, WM_DDE_POKE