home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 May
/
VPR9705A.ISO
/
VPR_DATA
/
PROGRAM
/
CBTRIAL
/
SETUP
/
DATA.Z
/
AUTO2.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-14
|
3KB
|
81 lines
//----------------------------------------------------------------------------
//Borland C++Builder
//Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
//----------------------------------------------------------------------------
//---------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#undef RegisterClass
#include "Auto2.h"
#include "Auto1.h"
//---------------------------------------------------------------------
int Initialization();
static int Initializer = Initialization();
//---------------------------------------------------------------------
__fastcall ButtonServer::ButtonServer()
: TAutoObject()
{
}
//---------------------------------------------------------------------
String __fastcall ButtonServer::GetEditStr()
{
return Form1->Edit1->Text;
}
//---------------------------------------------------------------------
void __fastcall ButtonServer::SetEditStr(AnsiString NewVal)
{
Form1->Edit1->Text = NewVal;
}
//---------------------------------------------------------------------
int __fastcall ButtonServer::GetEditNum()
{
int val;
sscanf(Form1->Edit1->Text.c_str(), "%d", &val);
return val;
}
//---------------------------------------------------------------------
void __fastcall ButtonServer::SetEditNum(int NewVal)
{
Form1->Edit1->Text = NewVal;
}
//---------------------------------------------------------------------
void __fastcall ButtonServer::Clear()
{
Form1->Edit1->Text = "";
}
//---------------------------------------------------------------------
void __fastcall ButtonServer::SetThreeStr(AnsiString s1, AnsiString s2, AnsiString s3)
{
Form1->Edit1->Text = s1 + ", " + s2 + ", " + s3;
}
//---------------------------------------------------------------------
void __fastcall ButtonServer::SetThreeNum(int n1, int n2, int n3)
{
AnsiString s1(n1), s2(n2), s3(n3);
Form1->Edit1->Text = s1 + ", " + s2 + ", " + s3;
}
//---------------------------------------------------------------------
void __fastcall RegisterButtonServer()
{
TAutoClassInfo AutoClassInfo;
AutoClassInfo.AutoClass = __classid(ButtonServer);
AutoClassInfo.ProgID = "BCBAutoSrv.EditServer";
AutoClassInfo.ClassID = "{61E124E1-C869-11CF-9EA7-00A02429B18A}";
AutoClassInfo.Description = "Borland C++Builder AutoSrv Example Server Class";
AutoClassInfo.Instancing = acMultiInstance;
Automation->RegisterClass(AutoClassInfo);
}
//---------------------------------------------------------------------
int Initialization()
{
RegisterButtonServer();
return 0;
}
//---------------------------------------------------------------------