1999-01-27 05:01:14 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: client.h
|
|
|
|
// Purpose: DDE sample: client
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 25/01/99
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
// Define a new application
|
|
|
|
class MyApp: public wxApp
|
|
|
|
{
|
2000-01-15 17:34:29 -05:00
|
|
|
public:
|
|
|
|
virtual bool OnInit();
|
|
|
|
virtual int OnExit();
|
1999-01-27 05:01:14 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
// Define a new frame
|
|
|
|
class MyFrame: public wxFrame
|
|
|
|
{
|
2000-01-15 17:34:29 -05:00
|
|
|
public:
|
|
|
|
MyFrame(wxFrame *frame, const wxString& title);
|
1999-01-27 05:01:14 -05:00
|
|
|
|
|
|
|
void OnExit(wxCommandEvent& event);
|
|
|
|
void OnExecute(wxCommandEvent& event);
|
|
|
|
void OnPoke(wxCommandEvent& event);
|
|
|
|
void OnRequest(wxCommandEvent& event);
|
2000-01-15 17:34:29 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
wxPanel *panel;
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
1999-01-27 05:01:14 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
class MyConnection: public wxConnection
|
|
|
|
{
|
2000-01-15 17:34:29 -05:00
|
|
|
public:
|
|
|
|
MyConnection();
|
|
|
|
|
|
|
|
bool OnAdvise(const wxString& topic, const wxString& item, char *data, int size, wxIPCFormat format);
|
|
|
|
bool OnDisconnect();
|
1999-01-27 05:01:14 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
class MyClient: public wxClient
|
|
|
|
{
|
2000-01-15 17:34:29 -05:00
|
|
|
public:
|
|
|
|
wxConnectionBase *OnMakeConnection();
|
1999-01-27 05:01:14 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#define CLIENT_QUIT wxID_EXIT
|
|
|
|
#define CLIENT_EXECUTE 2
|
|
|
|
#define CLIENT_REQUEST 3
|
|
|
|
#define CLIENT_POKE 4
|
|
|
|
#define CLIENT_LISTBOX 200
|