// Borland C++ Builder
// Copyright (c) 1995, 1998 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'AHMTHookClass.pas' rev: 3.00

#ifndef AHMTHookClassHPP
#define AHMTHookClassHPP
#include <Dialogs.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <SysUtils.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysInit.hpp>
#include <System.hpp>

//-- user supplied -----------------------------------------------------------

namespace Ahmthookclass
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TAHMHookMsg)(Messages::TMessage &Msg, bool &Handled);

class DELPHICLASS TAHMHookClass;
class PASCALIMPLEMENTATION TAHMHookClass : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TAHMHookMsg FAfterMessage;
	Classes::TNotifyEvent FOnReloadHook;
	TAHMHookMsg FBeforeMessage;
	Classes::TNotifyEvent FBeforeReload;
	
protected:
	void *NewWndProc;
	void *OldWndProc;
	bool FIsMDI;
	void __fastcall DefineHooks(void);
	
public:
	Controls::TWinControl* FHookedWnd;
	Classes::TComponent* HookedComponent;
	int HookedWindowHandle;
	__fastcall virtual TAHMHookClass(Classes::TComponent* HWinComponent, Classes::TComponent* HWinControl
		, bool IsMDI);
	__fastcall virtual ~TAHMHookClass(void);
	void __fastcall HookWin(void);
	void __fastcall UnhookWin(void);
	void __fastcall Hooked(Messages::TMessage &Msg);
	void __fastcall UpdateHooks(void);
	void __fastcall ReloadHook(void);
	void __fastcall DefaultMessage(Messages::TMessage &Msg);
	
__published:
	__property Classes::TNotifyEvent OnReloadHook = {read=FOnReloadHook, write=FOnReloadHook};
	__property Classes::TNotifyEvent BeforeReload = {read=FBeforeReload, write=FBeforeReload};
	__property TAHMHookMsg BeforeMessage = {read=FBeforeMessage, write=FBeforeMessage};
	__property TAHMHookMsg AfterMessage = {read=FAfterMessage, write=FAfterMessage};
};

class DELPHICLASS TAHMHookList;
class PASCALIMPLEMENTATION TAHMHookList : public Classes::TList 
{
	typedef Classes::TList inherited;
	
private:
	void __fastcall WndProc(Messages::TMessage &Message);
	
public:
	HWND Window;
	__fastcall TAHMHookList(void);
	__fastcall virtual ~TAHMHookList(void);
	HIDESBASE int __fastcall Add(Classes::TComponent* HWinComponent, Classes::TComponent* HWinControl, 
		bool IsMDI);
	HIDESBASE void __fastcall Remove(Classes::TComponent* HWinComponent);
};

//-- var, const, procedure ---------------------------------------------------
#define AHMCM_RECREATESYSWINDOW (int)(45558)
extern PACKAGE TAHMHookList* HookList;

}	/* namespace Ahmthookclass */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Ahmthookclass;
#endif
//-- end unit ----------------------------------------------------------------
#endif	// AHMTHookClass
