/******************************************************************************/
// module: FAbout.h version 1.2b //
// //
// About-dialog with a few lines of text and an animated icon playing //
// pinball with the dialogs frame. //
// //
// copyright (c) 2000-2003 by lars haendel //
// home: www.newty.de //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 2 of the License. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //
// //
/******************************************************************************/
#ifndef FAboutH
#define FAboutH
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <AppEvnts.hpp>
//-------------------------------------------------------------------------------------------
// about-dialog - important: deletes itselfs when closed. thus do not autocreate it!
class TFAbout : public TForm
{
__published:
TTimer *Timer;
TLabel *LaPurpose;
TLabel *LaWrittenBy;
TLabel *Label3;
TLabel *LaVisitUrl;
TLabel *Label5;
TLabel *LaMailTo;
TLabel *Label8;
TLabel *Label9;
TLabel *Label10;
TLabel *Label11;
TLabel *Label12;
TLabel *Label13;
TLabel *Label14;
TLabel *Label15;
TLabel *Label16;
TLabel *Label17;
TLabel *Label18;
TLabel *Label19;
TImage *Image;
void __fastcall OnTimer (TObject *Sender);
void __fastcall OnClose (TObject *Sender, TCloseAction &Action);
void __fastcall UrlClick (TObject *Sender);
void __fastcall MailClick (TObject *Sender);
void __fastcall FormShow(TObject *Sender);
void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
TShiftState Shift);
private:
//------------------------------------------------------------------------------------------
// struct to wrap the window-handle to be able to pass it by pointer to a thread-function
struct THandleWrap
{
HWND hwnd;
} wrapper;
// thread functions
friend void OpenMail(void* _tmp);
friend void OpenURL (void* _tmp);
TPicture *icon1, *icon2; // the two icons for the animation ;-)
TPanel *panel; // panel in which the image with the icon is displayed
int xIcon, yIcon; // icon position and ...
float directionPhi; // ... moving direction
int cxIcon, cyIcon; // size of an icon, usually 32x32
// counter which is used to count the number of timer-events after reflection
int nSmile;
// the panel's WindowProc() function is exchanged to eliminate the WM_ERASEBKGND message
Controls::TWndMethod OldWindowProc; // pointer to old function
void __fastcall NewWindowProc(TMessage& msg); // new one
public:
// constructor/destructor
__fastcall TFAbout(TComponent* Owner, const char* name, const AnsiString szDir);
};
extern PACKAGE TFAbout *FAbout;
#endif