| Navigation: Language Reference > App A - DDE, OLE, and OCX > DDE Procedures >====== DDETOPIC (return server topic) ====== | ![]() ![]() |
DDETOPIC( )
The DDETOPIC procedure returns a string containing the topic name for the DDE channel that has just posted a DDE event.
**Return Data Type: **STRING
Example:
WinOne WINDOW,AT(0,0,160,400)
** END**
TimeServer LONG
DateServer LONG
FormatTime STRING(5)
FormatDate STRING(8)
** CODE**
** OPEN(WinOne)**
** TimeServer = DDESERVER('SomeApp') !Open as server**
** ACCEPT**
** CASE EVENT()**
** OF EVENT:DDErequest**
** CASE **DDETOPIC() !Get requested topic
** OF 'Time'**
** FormatTime = FORMAT(CLOCK(),@T1)**
** DDEWRITE(TimeServer,DDE:manual,'Time',FormatTime)**
** OF 'Date'**
** FormatDate = FORMAT(TODAY(),@D1)**
** DDEWRITE(DateServer,DDE:manual,'Date',FormatDate)**
** END**
** END**
** END**
See Also:




