]>
Commit | Line | Data |
---|---|---|
a660d684 KB |
1 | \section{\class{wxDDEClient}}\label{wxddeclient} |
2 | ||
a660d684 | 3 | A wxDDEClient object represents the client part of a client-server DDE |
e2a6f233 | 4 | (Dynamic Data Exchange) conversation. |
a660d684 KB |
5 | |
6 | To create a client which can communicate with a suitable server, | |
7 | you need to derive a class from wxDDEConnection and another from wxDDEClient. | |
8 | The custom wxDDEConnection class will intercept communications in | |
9 | a `conversation' with a server, and the custom wxDDEServer is required | |
f6bcfd97 | 10 | so that a user-overridden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return |
a660d684 KB |
11 | a wxDDEConnection of the required class, when a connection is made. |
12 | ||
e2a6f233 JS |
13 | This DDE-based implementation is |
14 | available on Windows only, but a platform-independent, socket-based version | |
15 | of this API is available using \helpref{wxTCPClient}{wxtcpclient}. | |
16 | ||
a660d684 KB |
17 | \wxheading{Derived from} |
18 | ||
e2a6f233 JS |
19 | wxClientBase\\ |
20 | \helpref{wxObject}{wxobject} | |
a660d684 | 21 | |
954b8ae6 JS |
22 | \wxheading{Include files} |
23 | ||
24 | <wx/dde.h> | |
25 | ||
a660d684 KB |
26 | \wxheading{See also} |
27 | ||
e2a6f233 JS |
28 | \helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEConnection}{wxddeconnection}, |
29 | \helpref{Interprocess communications overview}{ipcoverview} | |
a660d684 KB |
30 | |
31 | \latexignore{\rtfignore{\wxheading{Members}}} | |
32 | ||
f510b7b2 | 33 | \membersection{wxDDEClient::wxDDEClient}\label{wxddeclientctor} |
a660d684 KB |
34 | |
35 | \func{}{wxDDEClient}{\void} | |
36 | ||
37 | Constructs a client object. | |
38 | ||
39 | \membersection{wxDDEClient::MakeConnection}\label{wxddeclientmakeconnection} | |
40 | ||
e2a6f233 | 41 | \func{wxConnectionBase *}{MakeConnection}{\param{const wxString\& }{host}, \param{const wxString\& }{service}, \param{const wxString\& }{topic}} |
a660d684 KB |
42 | |
43 | Tries to make a connection with a server specified by the host | |
44 | (machine name under UNIX, ignored under Windows), service name (must | |
45 | contain an integer port number under UNIX), and topic string. If the | |
46 | server allows a connection, a wxDDEConnection object will be returned. | |
47 | The type of wxDDEConnection returned can be altered by overriding | |
48 | the \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member to return your own | |
49 | derived connection object. | |
50 | ||
51 | \membersection{wxDDEClient::OnMakeConnection}\label{wxddeclientonmakeconnection} | |
52 | ||
e2a6f233 | 53 | \func{wxConnectionBase *}{OnMakeConnection}{\void} |
a660d684 KB |
54 | |
55 | The type of \helpref{wxDDEConnection}{wxddeconnection} returned from a \helpref{wxDDEClient::MakeConnection}{wxddeclientmakeconnection} call can | |
56 | be altered by deriving the {\bf OnMakeConnection} member to return your | |
e2a6f233 | 57 | own derived connection object. By default, a wxDDEConnection |
a660d684 KB |
58 | object is returned. |
59 | ||
60 | The advantage of deriving your own connection class is that it will | |
61 | enable you to intercept messages initiated by the server, such | |
f510b7b2 | 62 | as \helpref{wxDDEConnection::OnAdvise}{wxconnectiononadvise}. You may also want to |
a660d684 KB |
63 | store application-specific data in instances of the new class. |
64 | ||
f510b7b2 | 65 | \membersection{wxDDEClient::ValidHost}\label{wxddeclientvalidhost} |
a660d684 KB |
66 | |
67 | \func{bool}{ValidHost}{\param{const wxString\& }{host}} | |
68 | ||
cc81d32f VS |
69 | Returns true if this is a valid host name, false otherwise. This always |
70 | returns true under MS Windows. | |
a660d684 | 71 |