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

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

#ifndef AHMTMhkClassHPP
#define AHMTMhkClassHPP
#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 Ahmtmhkclass
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TAHMMenuHookMsg)(Messages::TMessage &Msg, bool &Handled);

class DELPHICLASS TAHMMenuHookClass;
class PASCALIMPLEMENTATION TAHMMenuHookClass : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	int 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, int 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};
};

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

//-- var, const, procedure ---------------------------------------------------
#define AHMCM_RECREATEMENUWINDOW (int)(45558)
extern PACKAGE TAHMMenuHookList* MenuHookList;

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