home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / ahmsyscm / _setup.1 / AHMTFormHook.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-11-12  |  2.5 KB  |  81 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'AHMTFormHook.pas' rev: 3.00
  6.  
  7. #ifndef AHMTFormHookHPP
  8. #define AHMTFormHookHPP
  9. #include <AHMSystem.hpp>
  10. #include <Windows.hpp>
  11. #include <Controls.hpp>
  12. #include <Classes.hpp>
  13. #include <Messages.hpp>
  14. #include <SysUtils.hpp>
  15. #include <SysInit.hpp>
  16. #include <System.hpp>
  17.  
  18. //-- user supplied -----------------------------------------------------------
  19.  
  20. namespace Ahmtformhook
  21. {
  22. //-- type declarations -------------------------------------------------------
  23. class DELPHICLASS TAHMHookComponent;
  24. class PASCALIMPLEMENTATION TAHMHookComponent : public Ahmsystem::TAHMSystemsComponent 
  25. {
  26.     typedef Ahmsystem::TAHMSystemsComponent inherited;
  27.     
  28. private:
  29.     HWND FApplicationHandle;
  30.     HWND FOwnerhandle;
  31.     Controls::TWinControl* FOwnerForm;
  32.     
  33. protected:
  34.     void *OldWndProc;
  35.     void *NewWndProc;
  36.     virtual void __fastcall Loaded(void);
  37.     void __fastcall HookWin(void);
  38.     void __fastcall UnhookWin(void);
  39.     
  40. public:
  41.     virtual void __fastcall Hooked(Messages::TMessage &AMsg);
  42.     __fastcall virtual TAHMHookComponent(Classes::TComponent* AOwner);
  43.     __fastcall virtual ~TAHMHookComponent(void);
  44.     __property Controls::TWinControl* OwnerForm = {read=FOwnerForm};
  45.     __property HWND OwnerHandle = {read=FOwnerhandle, nodefault};
  46.     __property HWND ApplicationHandle = {read=FApplicationHandle, nodefault};
  47. };
  48.  
  49. typedef void __fastcall (__closure *TAHMHookMessage)(System::TObject* Sender, Messages::TMessage &WndMessage
  50.     );
  51.  
  52. class DELPHICLASS TAHMFormHook;
  53. class PASCALIMPLEMENTATION TAHMFormHook : public Ahmtformhook::TAHMHookComponent 
  54. {
  55.     typedef Ahmtformhook::TAHMHookComponent inherited;
  56.     
  57. private:
  58.     TAHMHookMessage FMessage;
  59.     
  60. public:
  61.     virtual void __fastcall Hooked(Messages::TMessage &AMsg);
  62.     
  63. __published:
  64.     __property About ;
  65.     __property TAHMHookMessage OnMessage = {read=FMessage, write=FMessage};
  66. public:
  67.     /* TAHMHookComponent.Create */ __fastcall virtual TAHMFormHook(Classes::TComponent* AOwner) : Ahmtformhook::
  68.         TAHMHookComponent(AOwner) { }
  69.     /* TAHMHookComponent.Destroy */ __fastcall virtual ~TAHMFormHook(void) { }
  70.     
  71. };
  72.  
  73. //-- var, const, procedure ---------------------------------------------------
  74.  
  75. }    /* namespace Ahmtformhook */
  76. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  77. using namespace Ahmtformhook;
  78. #endif
  79. //-- end unit ----------------------------------------------------------------
  80. #endif    // AHMTFormHook
  81.