]>
Commit | Line | Data |
---|---|---|
1 | \section{\class{wxDDEClient}}\label{wxddeclient} | |
2 | ||
3 | \overview{Interprocess communications overview}{ipcoverview} | |
4 | ||
5 | A wxDDEClient object represents the client part of a client-server DDE | |
6 | (Dynamic Data Exchange) conversation (available in {\it both}\/ | |
7 | Windows and UNIX). | |
8 | ||
9 | To create a client which can communicate with a suitable server, | |
10 | you need to derive a class from wxDDEConnection and another from wxDDEClient. | |
11 | The custom wxDDEConnection class will intercept communications in | |
12 | a `conversation' with a server, and the custom wxDDEServer is required | |
13 | so that a user-overriden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return | |
14 | a wxDDEConnection of the required class, when a connection is made. | |
15 | ||
16 | \wxheading{Derived from} | |
17 | ||
18 | wxDDEObject | |
19 | ||
20 | \wxheading{See also} | |
21 | ||
22 | \helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEConnection}{wxddeconnection}, | |
23 | the chapter on interprocess communication in the user manual, and | |
24 | the programs in {\tt samples/ipc}. | |
25 | ||
26 | \latexignore{\rtfignore{\wxheading{Members}}} | |
27 | ||
28 | \membersection{wxDDEClient::wxDDEClient} | |
29 | ||
30 | \func{}{wxDDEClient}{\void} | |
31 | ||
32 | Constructs a client object. | |
33 | ||
34 | \membersection{wxDDEClient::MakeConnection}\label{wxddeclientmakeconnection} | |
35 | ||
36 | \func{wxDDEConnection *}{MakeConnection}{\param{const wxString\& }{host}, \param{const wxString\& }{service}, \param{const wxString\& }{topic}} | |
37 | ||
38 | Tries to make a connection with a server specified by the host | |
39 | (machine name under UNIX, ignored under Windows), service name (must | |
40 | contain an integer port number under UNIX), and topic string. If the | |
41 | server allows a connection, a wxDDEConnection object will be returned. | |
42 | The type of wxDDEConnection returned can be altered by overriding | |
43 | the \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member to return your own | |
44 | derived connection object. | |
45 | ||
46 | \membersection{wxDDEClient::OnMakeConnection}\label{wxddeclientonmakeconnection} | |
47 | ||
48 | \func{wxDDEConnection *}{OnMakeConnection}{\void} | |
49 | ||
50 | The type of \helpref{wxDDEConnection}{wxddeconnection} returned from a \helpref{wxDDEClient::MakeConnection}{wxddeclientmakeconnection} call can | |
51 | be altered by deriving the {\bf OnMakeConnection} member to return your | |
52 | own derived connection object. By default, an ordinary wxDDEConnection | |
53 | object is returned. | |
54 | ||
55 | The advantage of deriving your own connection class is that it will | |
56 | enable you to intercept messages initiated by the server, such | |
57 | as \helpref{wxDDEConnection::OnAdvise}{wxddeconnectiononadvise}. You may also want to | |
58 | store application-specific data in instances of the new class. | |
59 | ||
60 | \membersection{wxDDEClient::ValidHost} | |
61 | ||
62 | \func{bool}{ValidHost}{\param{const wxString\& }{host}} | |
63 | ||
64 | Returns TRUE if this is a valid host name, FALSE otherwise. This always | |
65 | returns TRUE under MS Windows. | |
66 | ||
67 |