Description
This example shows how to call an event handler from another event handler.
Form1 contains a Panel an a Button.
EventHandler.h EventHandler.cpp Copyright © 1997-2002 Rodolfo A. Frino. All rights reserved.
#ifndef EventHandlerH
#define EventHandlerH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TButton *Button1;
TPanel *Panel1;
void __fastcall Button1Click(TObject *Sender);
void __fastcall Panel1MouseDown(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y);
private: // User declarations
int pri_X;
int pri_Y;
TMouseButton pri_Button;
TShiftState pri_Shift;
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
#include