DDEITEM (return server item)

Top  Previous  Next

 

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:

DDEREAD

DDEEXECUTE

DDEPOKE