User Tools

Site Tools


ddechannel_return_dde_channel_number_.htm
Navigation:  Language Reference > App A - DDE, OLE, and OCX > DDE Procedures >====== DDECHANNEL (return DDE channel number) ====== Previous pageReturn to chapter overviewNext page

DDECHANNEL( )

blk2blue.jpg

The DDECHANNEL procedure returns a LONG integer containing the channel number of the DDE client or server application that has just posted a DDE event. This is the same value returned by the DDESERVER or DDECLIENT procedure when the DDE channel is established.

Return Data Type:     LONG

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','Time')    !Open as server

DateServer = DDESERVER('SomeApp','Date')    !Open as server

ACCEPT

 CASE EVENT()

 OF EVENT:DDErequest

  CASE DDECHANNEL()                         !Check which channel

  OF TimeServer

   FormatTime = FORMAT(CLOCK(),@T1)

   DDEWRITE(TimeServer,DDE:manual,'Time',FormatTime)

  OF DateServer

   FormatDate = FORMAT(TODAY(),@D1)

   DDEWRITE(DateServer,DDE:manual,'Date',FormatDate)

  END

 END

END

See Also:

DDECLIENT

DDESERVER

ddechannel_return_dde_channel_number_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1