include esldde.inc
stimulus DDE "esldde"
integer NumConv_IV
boolean WildCard_BV is true
string AppName_SV is "ESL"
string Topic_SV is "sample"
enabled visible color 26 primary textual region PrimaryWindow
size 500 150 at position 8 250
black foreground
title bar "Sample ESL DDE Application"
size border
system menu
minimize button
maximize button
response to start
copy DDEPollTopics(AppName_SV, Topic_SV) to NumConv_IV
if (NumConv_IV > 0) then
exit
else
call DDERegisterServer(AppName_SV, Topic_SV, WildCard_BV)
if (errorlevel != 0) then
send "ERROR: In DDERegisterServer call\n" to errorlog
end if
end if
response to PrimaryWindow on close
call DDEUnRegisterServer(AppName_SV, Topic_SV)
exit
# REST OF ESL application