home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 April
/
Chip_1997-04_cd.bin
/
prezent
/
cb
/
data.z
/
SAVEQAS.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-01-16
|
1KB
|
41 lines
//----------------------------------------------------------------------------
//Borland C++ Builder
//Copyright (c) 1987 Borland International Inc. All Rights Reserved.
//----------------------------------------------------------------------------
#include <VCL\vcl.h>
#pragma hdrstop
#include <memory> //for STL auto_ptr class
#include "SaveQAs.h"
#pragma resource "*.DFM"
//---------------------------------------------------------------------------
__fastcall TSaveQueryAs::TSaveQueryAs(TComponent* AOwner)
:TForm(AOwner)
{
}
__fastcall TSaveQueryAs::~TSaveQueryAs(void)
{
}
//---------------------------------------------------------------------------
bool __fastcall GetNewName(AnsiString& QueryName)
{
bool Result;
std::auto_ptr<TSaveQueryAs> pQuery(new TSaveQueryAs(Application));
pQuery->NameEdit->Text = QueryName;
Result = pQuery->ShowModal() == mrOk;
if(Result){
QueryName = pQuery->NameEdit->Text;
}
return Result;
};
void __fastcall TSaveQueryAs::NameEditChange( TObject* Sender)
{
OKBtn->Enabled = NameEdit->Text != "";
};
//End of conversion...