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

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

#ifndef ahmtmhkclassHPP
#define ahmtmhkclassHPP

#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 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:
	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};
};


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 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_RECREATEMENUWINDOW = 0xb1fd;
extern PACKAGE TAHMMenuHookList* MenuHookList;

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

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