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

// (DO NOT EDIT: machine generated header) 'AHMTMhkClass.pas' rev: 4.00

#ifndef AHMTMhkClassHPP
#define AHMTMhkClassHPP

#pragma delphiheader begin
#pragma option push -w-
#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 Ahmtmhkclass
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TAHMMenuHookMsg)(Messages::TMessage &Msg, bool &Handled);

class DELPHICLASS TAHMMenuHookClass;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION TAHMMenuHookClass : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	unsigned MenuHandle;
	TAHMMenuHookMsg FAfterMessage;
	Classes::TNotifyEvent FOnReloadMenuHook;
	TAHMMenuHookMsg FBeforeMessage;
	Classes::TNotifyEvent FBeforeReload;
	
protected:
	void *NewWndProc;
	void *OldWndProc;
	bool FIsMDI;
	
public:
	Controls::TWinControl* FMenuHookedWnd;
	Classes::TComponent* MenuHookedComponent;
	__fastcall virtual TAHMMenuHookClass(Classes::TComponent* HWinComponent, Classes::TComponent* HWinControl
		, bool IsMDI);
	__fastcall virtual ~TAHMMenuHookClass(void);
	void __fastcall MenuHookWin(void);
	void __fastcall UnMenuHookWin(void);
	void __fastcall MenuHooked(Messages::TMessage &Msg);
	void __fastcall UpdateMenuHooks(void);
	void __fastcall ReloadMenuHook(void);
	void __fastcall DefaultMessage(Messages::TMessage &Msg, unsigned Handle);
	
__published:
	__property Classes::TNotifyEvent OnReloadMenuHook = {read=FOnReloadMenuHook, write=FOnReloadMenuHook
		};
	__property Classes::TNotifyEvent BeforeReload = {read=FBeforeReload, write=FBeforeReload};
	__property TAHMMenuHookMsg BeforeMessage = {read=FBeforeMessage, write=FBeforeMessage};
	__property TAHMMenuHookMsg AfterMessage = {read=FAfterMessage, write=FAfterMessage};
};

#pragma pack(pop)

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

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
static const Word AHMCM_RECREATEMENUWINDOW = 0xb1f6;
extern PACKAGE TAHMMenuHookList* MenuHookList;

}	/* namespace Ahmtmhkclass */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Ahmtmhkclass;
#endif
#pragma option pop	// -w-

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