49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
//---------------------------------------------------------------------------
|
|
#include <vcl.h>
|
|
#pragma hdrstop
|
|
|
|
#include "ElasticForm.h"
|
|
#pragma package(smart_init)
|
|
//---------------------------------------------------------------------------
|
|
// ValidCtrCheck is used to assure that the components created do not have
|
|
// any pure virtual functions.
|
|
//
|
|
|
|
static inline void ValidCtrCheck(TElasticForm *)
|
|
{
|
|
new TElasticForm(NULL);
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
__fastcall TElasticForm::TElasticForm(TComponent* Owner)
|
|
: TControl(Owner)
|
|
{
|
|
nOwner = Owner;
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
namespace Elasticform
|
|
{
|
|
void __fastcall PACKAGE Register()
|
|
{
|
|
TComponentClass classes[1] = {__classid(TElasticForm)};
|
|
RegisterComponents("JD soft.", classes, 0);
|
|
}
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
void __fastcall ResizeALL(void)
|
|
{
|
|
int i;
|
|
// Nos damos un vueltazo por todos los componectes visibles del formulario
|
|
for ( i=0; i<nOwner->ComponentCount; i ++ )
|
|
{
|
|
if ( nOwner->Components[i]->ClassNameIs( "TButton" ) )
|
|
{
|
|
//cast the component to a TButton *
|
|
button = (TButton *)(nOwner->Components[i]);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
|