1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
<HTML>
<head><title>wxDDEClient</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="wxddeclient"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx65.htm#wxdc"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx67.htm#wxddeconnection"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>wxDDEClient</H2>
<P>
A wxDDEClient object represents the client part of a client-server DDE
(Dynamic Data Exchange) conversation.<P>
To create a client which can communicate with a suitable server,
you need to derive a class from wxDDEConnection and another from wxDDEClient.
The custom wxDDEConnection class will intercept communications in
a 'conversation' with a server, and the custom wxDDEServer is required
so that a user-overriden <A HREF="wx66.htm#wxddeclientonmakeconnection">wxDDEClient::OnMakeConnection</A> member can return
a wxDDEConnection of the required class, when a connection is made.<P>
This DDE-based implementation is
available on Windows only, but a platform-independent, socket-based version
of this API is available using <A HREF="wx236.htm#wxtcpclient">wxTCPClient</A>.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
wxClientBase<BR>
<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
<wx/dde.h><P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx68.htm#wxddeserver">wxDDEServer</A>, <A HREF="wx67.htm#wxddeconnection">wxDDEConnection</A>,
<A HREF="wx301.htm#ipcoverview">Interprocess communications overview</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#topic193">wxDDEClient::wxDDEClient</A><BR>
<A HREF="#wxddeclientmakeconnection">wxDDEClient::MakeConnection</A><BR>
<A HREF="#wxddeclientonmakeconnection">wxDDEClient::OnMakeConnection</A><BR>
<A HREF="#topic194">wxDDEClient::ValidHost</A><BR>
<P>
<HR>
<A NAME="topic193"></A>
<H3>wxDDEClient::wxDDEClient</H3>
<P>
<B></B> <B>wxDDEClient</B>()<P>
Constructs a client object.<P>
<HR>
<A NAME="wxddeclientmakeconnection"></A>
<H3>wxDDEClient::MakeConnection</H3>
<P>
<B>wxConnectionBase *</B> <B>MakeConnection</B>(<B>const wxString& </B><I>host</I>, <B>const wxString& </B><I>service</I>, <B>const wxString& </B><I>topic</I>)<P>
Tries to make a connection with a server specified by the host
(machine name under UNIX, ignored under Windows), service name (must
contain an integer port number under UNIX), and topic string. If the
server allows a connection, a wxDDEConnection object will be returned.
The type of wxDDEConnection returned can be altered by overriding
the <A HREF="wx66.htm#wxddeclientonmakeconnection">wxDDEClient::OnMakeConnection</A> member to return your own
derived connection object.<P>
<HR>
<A NAME="wxddeclientonmakeconnection"></A>
<H3>wxDDEClient::OnMakeConnection</H3>
<P>
<B>wxConnectionBase *</B> <B>OnMakeConnection</B>()<P>
The type of <A HREF="wx67.htm#wxddeconnection">wxDDEConnection</A> returned from a <A HREF="wx66.htm#wxddeclientmakeconnection">wxDDEClient::MakeConnection</A> call can
be altered by deriving the <B>OnMakeConnection</B> member to return your
own derived connection object. By default, a wxDDEConnection
object is returned.<P>
The advantage of deriving your own connection class is that it will
enable you to intercept messages initiated by the server, such
as <A HREF="wx67.htm#wxddeconnectiononadvise">wxDDEConnection::OnAdvise</A>. You may also want to
store application-specific data in instances of the new class.<P>
<HR>
<A NAME="topic194"></A>
<H3>wxDDEClient::ValidHost</H3>
<P>
<B>bool</B> <B>ValidHost</B>(<B>const wxString& </B><I>host</I>)<P>
Returns TRUE if this is a valid host name, FALSE otherwise. This always
returns TRUE under MS Windows.<P>
</BODY></HTML>
|