//---------------------------------------------------------------------------

#ifndef FormMainH
#define FormMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <Dialogs.hpp>
#include <ExtCtrls.hpp>
#include <ExtDlgs.hpp>
//---------------------------------------------------------------------------
#include "SVImage.h"

class TFrmMain : public TForm
{
__published:	// IDE-managed Components
    TPanel *pnMain;
    TPanel *pnSub;
    TPanel *pnBase;
    TScrollBox *sbDraw;
    TSavePictureDialog *SavePictureDialog1;
    TOpenPictureDialog *OpenPictureDialog1;
    TBitBtn *btSave;
    TBitBtn *btLoad;
    TTimer *Timer1;
    TBitBtn *btRandom;
    TLabel *Label1;
    TLabel *Label2;
    TPanel *pnDraw;
    TButton *Button1;
    void __fastcall btLoadClick(TObject *Sender);
    void __fastcall btSaveClick(TObject *Sender);
    void __fastcall Timer1Timer(TObject *Sender);
    void __fastcall btRandomClick(TObject *Sender);
    void __fastcall FormDestroy(TObject *Sender);
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall Button1Click(TObject *Sender);
private:	// User declarations
    //Sub Classing.
    TWndMethod OriginalProc;
    void __fastcall PanelProc(Messages::TMessage &msg);

public:		// User declarations
    __fastcall TFrmMain(TComponent* Owner);
    void __fastcall OnPaint();
    SImage Img ;
    HDC hdc ;
    HDC memDC ;
};
//---------------------------------------------------------------------------
extern PACKAGE TFrmMain *FrmMain;
//---------------------------------------------------------------------------
#endif
