If a DDE frame owns more than one conversation with advise links, you can get the channel number of the conversation and the name of the data item to which a
DDE-NOTIFY event applies from the
DDE-ID and
DDE-ITEM attributes of the frame. This is enough information to retrieve the value that triggered the event with the
DDE GET statement. However, you might also need the application and topic names to fully identify the item from which you are retrieving data. This is necessary if the different conversations (different topics and/or applications) include links to data items with the same name. You can obtain the application and topic names related to the current
DDE-NOTIFY event from the
DDE-NAME and
DDE-TOPIC attributes of the frame. For more information on DDE frame attributes, see
Defining conversation endpoints: DDE frames.
However, you might find it simpler to manage event-driven exchanges by using a separate DDE frame for each advise link. In this case, you initiate an additional conversation for each advise link that you want to establish for the same application and topic, using a separate DDE frame for each conversation. You then set up each advise link using its own conversation ID. When a DDE-NOTIFY event occurs for a linked data item, you do not have to check for the source of the event, because each data item has its own frame trigger. The following code fragment shows the essential elements of this technique to link two data cells in the same Excel worksheet to two ABL variables (quote1 and quote2):