Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - Norton Guide http://www.X-Hacker.org [^^Up^^] [Menu] [About The Guide]
 WDDEClient             DDE Client class
 ----------------------------------------------------------------------------
 WDDEClient
 DDE Client class
 ----------------------------------------------------------------------------
 
 Properties
 Done           A logical indicating whether a transaction has completed
 DoneOK         A logical indicating whether a transaction has completed OK
 
 The following also exist, but are not expected to need changing:
 
 ClassStyle     The window's class style (a combination of CS_* values)
 Messages       An array of the messages (WM_*) handled by the window
 WndProc        A code block to handle messages (WM_*) for the window
 WndStyle       The control's usual style (a combination of WS_* values)
 
 Methods
 WDDEClient:Advise()      Ask to be informed whenever a specified data item changes
 WDDEClient:Axit()        Destroy a DDE client object
 WDDEClient:Execute()     Send a command to the server for execution
 WDDEClient:Init()        Construct a DDE client object
 WDDEClient:OnAccept()    Handles the acceptance of data or a command by the server
 WDDEClient:OnData()      Handles the receipt of data from the server
 WDDEClient:OnReject()    Handles the rejecting of data or a command by the server
 WDDEClient:Poke()        Send data to the server
 WDDEClient:Request()     Request data from the server
 WDDEClient:SeriousError() Handle a serious error
 WDDEClient:ServerInfo()  Get information about one or more servers
 WDDEClient:Start()       Start a conversation with a specified server
 WDDEClient:Stop()        Stop the conversation with the server
 WDDEClient:UnAdvise()    Ask not to be informed when a specified data item changes
 
 WDDEClient:The following also exist, but are not expected to need changing:
 
 WDDEClient:AddWindow()   For internal use.
 WDDEClient:Create()      Create a DDE window
 WDDEClient:DefaultMessage()   Default handler for messages
 WDDEClient:DelWindow()   For internal use.
 WDDEClient:HandleMessage()    Handle/dispatch messages
 WDDEClient:MayTermInitiate()  Default handling of ack when only seeking server info
 WDDEClient:OnClose()     Handles requests to close the window
 WDDEClient:OnCreate()    Handles window creation messages
 WDDEClient:OnDDEAck()    Handles DDE acknowledges
 WDDEClient:OnDDEData()   Handles DDE data
 WDDEClient:OnDDETerminate()   Handles DDE termination
 WDDEClient:OnDestroy()   Pre-destruction of a window
 WDDEClient:OnInitDialog()     Dialog initialisation message
 WDDEClient:OnNCDestroy() Post-destruction of a window
 WDDEClient:OnPaint()     Request to draw a window
 WDDEClient:OnQueryEndSession()     Windows shut-down request
 WDDEClient:OnTimer()     Timer message
 WDDEClient:Paint()       Draw/re-draw a window
 WDDEClient:RegisterClass()    Register a window class, if needed
 
 Inherits From
 WWindowBase
 
 Inherited By
 Nothing.
 
 Description
 This class can be used to set up the client end of a DDE
 client/server conversation.
 
 A DDE conversation starts when a client connects to a server
 (e.g. by the Start() method sending a WM_DDE_INITIATE
 message), and stops when either sends a WM_DDE_TERMINATE
 message.  Usually it is the client that sends the terminate,
 e.g. using the Stop() method, but the server can send the
 terminate.
 
 DDE conversations are mostly asynchronous: a client asks for
 something to happen and the server does it after some
 indeterminate time.  The server can reject requests, so to
 determine when a request has completed you either have to keep
 checking the Done property (but you must keep your message
 loop going as well), or provide the appropriate OnAccept(),
 OnData() and/or OnReject() methods in a subclass.
 
 Internally, DDE conversations involve handles to (invisible)
 windows, so the classes allocate these automatically.
 
 Generally, a transaction is about a topic (specified by a
 string), and may involve command(s) from the client and/or
 data items (each specified by a string).
 
 Commands are sent by the client using the Execute() method.
 
 Data items can have several formats; text uses CF_TEXT, which
 is the default.
 
 Data items can be requested by the client either once, using
 the Request() method, or whenever they change, using the
 Advise() method.
 
 Many of the methods are simply "stubs" which return NIL, to
 allow them to be easily defined in a sub-class.
 
 Example
 // From SOURCE\OO\CLASSES\DDECLIEN.PRG:
 METHOD ProgMan()                                              ;
       INLINE local  oDDE,                                      ;
              local  cAdd,                                      ;
              oDDE := WDDEClient{self, "ProgMan", "ProgMan"},   ;
              ; // make a group
              oDDE:Execute("[DeleteGroup(Clip-4-Win Test)]"),   ;
              oDDE:Execute("[CreateGroup(Clip-4-Win Test)]"),   ;
              oDDE:Execute("[ShowGroup(Clip-4-Win Test)]"),     ;
              ; // somethings to see (you should have these...)
              cAdd := "[AddItem(" + GetWindowsDirectory(),     ;
              oDDE:Execute(cAdd + "\CLOCK.EXE, Clock)]"),       ;
              oDDE:Execute(cAdd + "\CONTROL.EXE, Control Panel)]"),;
              oDDE:Execute(cAdd                                 ;
                           + "\COMMAND.COM, MS-DOS Prompt)]"),  ;
              oDDE:Execute(cAdd + "\NOTEPAD.EXE, Notepad)]"),   ;
              oDDE:Execute(cAdd + "\PBRUSH.EXE, Windows Paint)]"),;
              ; // admire the view
              ::MsgBox("Press OK after you've had a look at" + CR ;
                       + "the new group in Program Manager"),   ;
              ; // clean up
              oDDE:Execute("[DeleteGroup(Clip-4-Win Test)]"),   ;
              0
 
 See Also  (press Enter)

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson