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]
 WDDEServer             DDE Server class
 ----------------------------------------------------------------------------
 WDDEServer
 DDE Server class
 ----------------------------------------------------------------------------
 
 Properties
 Done           A logical indicating whether a transaction has completed
 
 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
 WDDEServer:Axit()        Destroy a DDE Server object
 WDDEServer:Init()        Construct a DDE server object
 WDDEServer:OnAccept()    Handles the acceptance of data by the client
 WDDEServer:OnDDEAdvise() Client wants to be informed whenever a data item changes
 WDDEServer:OnDDEExecute() Client sending commands to the server for execution
 WDDEServer:OnDDEPoke()   Client sending data to the server
 WDDEServer:OnDDERequest() Client requesting data from the server
 WDDEServer:OnDDEUnAdvise()  Client no longer wants to know about data item changes
 WDDEServer:OnReject()    Handles the rejecting of data by the client
 WDDEServer:PostNAck()    Reject a client transaction
 WDDEServer:SeriousError() Handle a serious error
 WDDEServer:Start()       Handle a client starting a conversation
 WDDEServer:Stop()        Stop the conversation with the client
 
 WDDEServer:The following also exist, but are not expected to need changing:
 
 WDDEServer:AddWindow()   For internal use.
 WDDEServer:Create()      Create a DDE window
 WDDEServer:DefaultMessage()   Default handler for messages
 WDDEServer:DelWindow()   For internal use.
 WDDEServer:HandleMessage()    Handle/dispatch messages
 WDDEServer:MayTermInitiate()  Default handling of ack when only seeking server info
 WDDEServer:OnClose()     Handles requests to close the window
 WDDEServer:OnCreate()    Handles window creation messages
 WDDEServer:OnDDEAck()    Handles DDE acknowledges
 WDDEServer:OnDDEInitiate()    Handles a DDE initiate, then invokes the Start() method
 WDDEServer:OnDDETerminate()   Handles DDE termination
 WDDEServer:OnDestroy()   Pre-destruction of a window
 WDDEServer:OnInitDialog()     Dialog initialisation message
 WDDEServer:OnNCDestroy() Post-destruction of a window
 WDDEServer:OnPaint()     Request to draw a window
 WDDEServer:OnQueryEndSession()     Windows shut-down request
 WDDEServer:OnTimer()     Timer message
 WDDEServer:Paint()       Draw/re-draw a window
 WDDEServer:RegisterClass()    Register a window class, if needed
 
 Inherits From
 WWindowBase
 
 Inherited By
 Nothing.
 
 Description
 This class can be used to set up the server 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.
 
 Note: writing a server using this class is fairly easy, but
 getting it exactly right in all circumstances is quite hard.
 You're advised to get full documentation that covers all
 eventualities, especially error handling.
 
 The following is from SOURCE\OO\CLASSES\DDESERVE.PRG:
 
 This server works by listening for a WM_DDE_INITIATE, with an
 atom matching its server name (a zero atom always matches).
 It then establishes a slave (a copy of itself) as the server
 for the conversation.  The slave doesn't respond to
 WM_INITIATE messages, or mayhem would result.  Master and
 slaves are almost clones - e.g. they share things like ::aoConv.
 
 The above means that the only DDE msg a master should receive
 is WM_DDE_INITIATE, and its slaves should respond to all other
 DDE messages.  This is slightly wasteful, but 2 classes seemed
 yet more wasteful.
 
 Slave windows are children of the master.  The master window
 is a top-level window so it receives broadcasts.  Slaves don't
 want to receive broadcasts.  To help this, oParent is altered
 in a way that's a bit ugly [see ::Init()].  Sorry.
 
 Example
 // From SOURCE\OO\CLASSES\DDESERVE.PRG:
 oDDE := WDDEServer{self, "MyDDEServer"}
 
 See Also  (press Enter)

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