linkimage.~h

来自「最简单的VCL控件BCB源码。扩展了TImage的功能」· ~H 代码 · 共 41 行

~H
41
字号
  //---------------------------------------------------------------------------  
   
  #ifndef   LinkImageH  
  #define   LinkImageH  
  //---------------------------------------------------------------------------  
  #include   <SysUtils.hpp>  
  #include   <Controls.hpp>  
  #include   <Classes.hpp>  
  #include   <Forms.hpp>  
  #include   <ExtCtrls.hpp>  
  //---------------------------------------------------------------------------  
  class   PACKAGE   TLinkImage   :   public   TImage  
  {  
  private:  
          TPicture   *   FHoverPic;  
          TPicture   *   FLinkPic;  
          TNotifyEvent   Fabc;  
          void   __fastcall   SetPicture(Graphics::TPicture   *   value);  
          void   __fastcall   SetHoverPic(Graphics::TPicture   *   value);  
          void   __fastcall   abcd(TNotifyEvent   value);  
  protected:  
          BEGIN_MESSAGE_MAP  
                  VCL_MESSAGE_HANDLER(CM_MOUSEENTER,   Messages::TMessage,   MouseEnter)  
                  VCL_MESSAGE_HANDLER(CM_MOUSELEAVE,   Messages::TMessage,   MouseLeave)  
          END_MESSAGE_MAP(TImage)  
          void   __fastcall   MouseEnter(Messages::TMessage   &   Message);  
          void   __fastcall   MouseLeave(Messages::TMessage   &   Message);  
          virtual   void   __fastcall   CreateWnd(void);  
  public:  
          __fastcall   TLinkImage(TComponent*   Owner);  
          __fastcall   ~TLinkImage();  
          DYNAMIC   void   __fastcall   Click(void);  
  __published:  
          __property   Graphics::TPicture   *   LinkPic     =   {   read=FLinkPic,   write=SetPicture   };  
          __property   Graphics::TPicture   *   HoverPic     =   {   read=FHoverPic,   write=SetHoverPic   };  
          __property   Picture   =   {read=FPicture,   write=SetPicture};  
          __property   TNotifyEvent   abc     =   {   read=Fabc,   write=abcd   };  
  };  
  //---------------------------------------------------------------------------  
  #endif  

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?