// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ahmthookclass.pas' rev: 6.00

#ifndef ahmthookclassHPP
#define ahmthookclassHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Dialogs.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

//-- 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;
	unsigned 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 unsigned __fastcall Add(Classes::TComponent* HWinComponent, Classes::TComponent* HWinControl, bool IsMDI);
	HIDESBASE void __fastcall Remove(Classes::TComponent* HWinComponent);
};


//-- var, const, procedure ---------------------------------------------------
static const Word AHMCM_RECREATESYSWINDOW = 0xb1f6;
extern PACKAGE TAHMHookList* HookList;

}	/* namespace Ahmthookclass */
using namespace Ahmthookclass;
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// ahmthookclass
