User Tools

Site Tools


ddeitem_return_server_item_.htm
Navigation:  Language Reference > App A - DDE, OLE, and OCX > DDE Procedures >====== DDEITEM (return server item) ====== Previous pageReturn to chapter overviewNext page

DDEITEM( )

blk2blue.jpg

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:

DDEREAD

DDEEXECUTE

DDEPOKE

ddeitem_return_server_item_.htm.txt · Last modified: 2021/04/15 15:57 (external edit)