Navigation: Language Reference > App A - DDE, OLE, and OCX > DDE Procedures >====== DDEITEM (return server item) ====== | |
DDEITEM( )
The DDEITEM procedure returns a string containing the name of the item for the current DDE event. This is the item requested by a DDEREAD, or the data item supplied by DDEPOKE.
Return Data Type: STRING
Example:
WinOne WINDOW,AT(0,0,160,400)
END
Server LONG
FormatTime STRING(5)
FormatDate STRING(8)
CODE
OPEN(WinOne)
Server = DDESERVER('SomeApp','Clock') !Open as server for my topic
ACCEPT
CASE EVENT()
OF EVENT:DDErequest
CASE DDEITEM()
OF 'Time'
FormatTime = FORMAT(CLOCK(),@T1)
DDEWRITE(Server,DDE:manual,'Time',FormatTime)
OF 'Date'
FormatDate = FORMAT(TODAY(),@D1)
DDEWRITE(Server,DDE:manual,'Date',FormatDate)
END
OF EVENT:DDEadvise
CASE DDEITEM()
OF 'Time'
FormatTime = FORMAT(CLOCK(),@T1)
DDEWRITE(Server,1,'Time',FormatTime)
OF 'Date'
FormatDate = FORMAT(TODAY(),@D1)
DDEWRITE(Server,60,'Date',FormatDate)
END
END
END
See Also: