home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
DDEMAN.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
10KB
|
252 lines
//----------------------------------------------------------------------------
// DdeMan.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: DdeMan.pas
//----------------------------------------------------------------------------
#ifndef DdeManHPP
#define DdeManHPP
//----------------------------------------------------------------------------
#include <StdCtrls.hpp>
#include <Ddeml.hpp>
#include <Controls.hpp>
#include <Forms.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Ddeman
{
//-- type declarations -------------------------------------------------------
enum TDataMode { ddeAutomatic, ddeManual };
typedef void __fastcall (__closure *TMacroEvent)(System::TObject* Sender, Classes::TStrings* Msg);
class __declspec(delphiclass) TDdeClientConv;
class __declspec(delphiclass) TDdeClientItem;
class __declspec(pascalimplementation) TDdeClientConv : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
System::AnsiString FDdeService;
System::AnsiString FDdeTopic;
long FConv;
CONVINFO FCnvInfo;
Classes::TList* FItems;
long FHszApp;
long FHszTopic;
int FDdeFmt;
Classes::TNotifyEvent FOnClose;
Classes::TNotifyEvent FOnOpen;
System::AnsiString FAppName;
TDataMode FDataMode;
TDataMode FConnectMode;
bool FWaitStat;
bool FFormatChars;
void __fastcall SetDdeService(const System::AnsiString Value);
void __fastcall SetDdeTopic(const System::AnsiString Value);
void __fastcall SetService(const System::AnsiString Value);
void __fastcall SetTopic(const System::AnsiString Value);
void __fastcall SetConnectMode(TDataMode NewMode);
void __fastcall SetFormatChars(bool NewFmt);
void __fastcall XactComplete(void);
void __fastcall SrvrDisconnect(void);
void __fastcall DataChange(long DdeDat, long hszIt);
protected:
bool __fastcall CreateDdeConv(long FHszApp, long FHszTopic);
Classes::TPersistent* __fastcall GetCliItemByName(const System::AnsiString ItemName);
Classes::TPersistent* __fastcall GetCliItemByCtrl(TDdeClientItem* ACtrl);
virtual void __fastcall Loaded(void);
virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
void __fastcall ReadLinkInfo(Classes::TReader* Reader);
void __fastcall WriteLinkInfo(Classes::TWriter* Writer);
bool __fastcall OnSetItem(TDdeClientItem* aCtrl, const System::AnsiString S);
void __fastcall OnAttach(TDdeClientItem* aCtrl);
void __fastcall OnDetach(TDdeClientItem* aCtrl);
virtual void __fastcall Close(void);
virtual void __fastcall Open(void);
bool __fastcall ChangeLink(const System::AnsiString App, const System::AnsiString Topic, const System::AnsiString
Item);
void __fastcall ClearItems(void);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
public:
__fastcall virtual TDdeClientConv(Classes::TComponent* AOwner);
__fastcall virtual ~TDdeClientConv(void);
bool __fastcall PasteLink(void);
bool __fastcall OpenLink(void);
bool __fastcall SetLink(const System::AnsiString Service, const System::AnsiString Topic);
void __fastcall CloseLink(void);
bool __fastcall StartAdvise(void);
bool __fastcall PokeDataLines(const System::AnsiString Item, Classes::TStrings* Data);
bool __fastcall PokeData(const System::AnsiString Item, char * Data);
bool __fastcall ExecuteMacroLines(Classes::TStrings* Cmd, bool waitFlg);
bool __fastcall ExecuteMacro(char * Cmd, bool waitFlg);
char * __fastcall RequestData(const System::AnsiString Item);
__property int DdeFmt = {read=FDdeFmt, nodefault};
__property bool WaitStat = {read=FWaitStat, nodefault};
__property long Conv = {read=FConv, nodefault};
__property TDataMode DataMode = {read=FDataMode, write=FDataMode, nodefault};
__published:
__property System::AnsiString ServiceApplication = {read=FAppName, write=FAppName, nodefault};
__property System::AnsiString DdeService = {read=FDdeService, write=SetDdeService, nodefault};
__property System::AnsiString DdeTopic = {read=FDdeTopic, write=SetDdeTopic, nodefault};
__property TDataMode ConnectMode = {read=FConnectMode, write=SetConnectMode, default=0};
__property bool FormatChars = {read=FFormatChars, write=SetFormatChars, default=0};
__property Classes::TNotifyEvent OnClose = {read=FOnClose, write=FOnClose};
__property Classes::TNotifyEvent OnOpen = {read=FOnOpen, write=FOnOpen};
};
class __declspec(pascalimplementation) TDdeClientItem : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
Classes::TStrings* FLines;
TDdeClientConv* FDdeClientConv;
System::AnsiString FDdeClientItem;
Classes::TNotifyEvent FOnChange;
System::AnsiString __fastcall GetText(void);
void __fastcall SetDdeClientItem(const System::AnsiString Val);
void __fastcall SetDdeClientConv(TDdeClientConv* Val);
void __fastcall SetText(const System::AnsiString S);
void __fastcall SetLines(Classes::TStrings* L);
void __fastcall OnAdvise(void);
protected:
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
public:
__fastcall virtual TDdeClientItem(Classes::TComponent* AOwner);
__fastcall virtual ~TDdeClientItem(void);
__published:
__property System::AnsiString Text = {read=GetText, write=SetText, nodefault};
__property Classes::TStrings* Lines = {read=FLines, write=SetLines, nodefault};
__property TDdeClientConv* DdeConv = {read=FDdeClientConv, write=SetDdeClientConv, nodefault};
__property System::AnsiString DdeItem = {read=FDdeClientItem, write=SetDdeClientItem, nodefault};
__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
};
class __declspec(delphiclass) TDdeServerConv;
class __declspec(pascalimplementation) TDdeServerConv : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
Classes::TNotifyEvent FOnOpen;
Classes::TNotifyEvent FOnClose;
TMacroEvent FOnExecuteMacro;
protected:
virtual void __fastcall Connect(void);
virtual void __fastcall Disconnect(void);
public:
__fastcall virtual TDdeServerConv(Classes::TComponent* AOwner);
__fastcall virtual ~TDdeServerConv(void);
long __fastcall ExecuteMacro(long Data);
__published:
__property Classes::TNotifyEvent OnOpen = {read=FOnOpen, write=FOnOpen};
__property Classes::TNotifyEvent OnClose = {read=FOnClose, write=FOnClose};
__property TMacroEvent OnExecuteMacro = {read=FOnExecuteMacro, write=FOnExecuteMacro};
};
class __declspec(delphiclass) TDdeServerItem;
class __declspec(pascalimplementation) TDdeServerItem : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
Classes::TStrings* FLines;
TDdeServerConv* FServerConv;
Classes::TNotifyEvent FOnChange;
Classes::TNotifyEvent FOnPokeData;
int FFmt;
void __fastcall ValueChanged(void);
protected:
System::AnsiString __fastcall GetText(void);
void __fastcall SetText(const System::AnsiString Item);
void __fastcall SetLines(Classes::TStrings* Value);
void __fastcall SetServerConv(TDdeServerConv* SConv);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
public:
__fastcall virtual TDdeServerItem(Classes::TComponent* AOwner);
__fastcall virtual ~TDdeServerItem(void);
long __fastcall PokeData(long Data);
void __fastcall CopyToClipboard(void);
virtual void __fastcall Change(void);
__property int Fmt = {read=FFmt, nodefault};
__published:
__property TDdeServerConv* ServerConv = {read=FServerConv, write=SetServerConv, nodefault};
__property System::AnsiString Text = {read=GetText, write=SetText, nodefault};
__property Classes::TStrings* Lines = {read=FLines, write=SetLines, nodefault};
__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
__property Classes::TNotifyEvent OnPokeData = {read=FOnPokeData, write=FOnPokeData};
};
class __declspec(delphiclass) TDdeMgr;
class __declspec(pascalimplementation) TDdeMgr : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
System::AnsiString FAppName;
long FHszApp;
Classes::TList* FConvs;
Classes::TList* FCliConvs;
Classes::TList* FConvCtrls;
long FDdeInstId;
Word FLinkClipFmt;
void __fastcall Disconnect(Classes::TComponent* DdeSrvrConv);
Classes::TComponent* __fastcall GetSrvrConv(const System::AnsiString Topic);
bool __fastcall AllowConnect(long hszApp, long hszTopic);
long __fastcall AllowWildConnect(long hszApp, long hszTopic);
bool __fastcall Connect(long Conv, long hszTopic, bool SameInst);
void __fastcall PostDataChange(const System::AnsiString Topic, System::AnsiString Item);
void __fastcall SetAppName(const System::AnsiString Name);
void __fastcall ResetAppName(void);
TDdeServerConv* __fastcall GetServerConv(const System::AnsiString Topic);
void __fastcall InsertServerConv(TDdeServerConv* SConv);
void __fastcall RemoveServerConv(TDdeServerConv* SConv);
void __fastcall DoError(void);
Forms::TForm* __fastcall GetForm(const System::AnsiString Topic);
public:
__fastcall virtual TDdeMgr(Classes::TComponent* AOwner);
__fastcall virtual ~TDdeMgr(void);
System::AnsiString __fastcall GetExeName(void);
__property long DdeInstId = {read=FDdeInstId, write=FDdeInstId, nodefault};
__property System::AnsiString AppName = {read=FAppName, write=SetAppName, nodefault};
__property Word LinkClipFmt = {read=FLinkClipFmt, nodefault};
};
//-- var, const, procedure ---------------------------------------------------
extern TDdeMgr* ddeMgr;
extern bool __fastcall GetPasteLinkInfo( System::AnsiString &Service, System::AnsiString &Topic, System::AnsiString &
Item);
} /* namespace Ddeman */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Ddeman;
#endif
//-- end unit ----------------------------------------------------------------
#endif // DdeMan