DdeCallback_ExecuteΒΆ

DdeCallback_Execute is called by the client, when a command in UniScript should be performed.

bool = DdeCallback_Execute(hConv, ssItem, ssTopic)

Return Value

bool is TRUE (1) if the function was successful, otherwise FALSE(0).

Parameters

hConv

hConv is the channel name.

ssItem

ssItem is the item name.

ssTopic

ssCommand is the command which is performed by UniPlot.

Example

The following Word-Basic program causes UniPlot to quit:

Sub Main
    chan = DDEInitiate("UniPlotSL", "xyz")
    DDEExecute(chan, "[quit]")
    DDETerminate(chan)
End Sub

The Word-Basic command DDEExecute(chan, "[quit]") will call the callback function DdeCallback_Execute in the UniPlot\Script\obj_dde.ic file which should be altered to:

def DdeCallback_Execute(hConv, ssItem, ssCommand)
{
    printf("---Execute---\n");
    printf("Conversation-No.: %x, Item: %s, Data: %s\n\n", ..
        hConv, ssItem, ssData);
    if (ssCommand == "[quit]") {
       AppQuit();
    }
    return TRUE;
}

id-1426950