home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue26 / tiptrix / ClassPlu / Unit1.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1997-09-17  |  801 b   |  40 lines

  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls, Menus, ClassPlug, ExtCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Panel1: TPanel;
  12.     Panel2: TPanel;
  13.   private
  14.     { Private declarations }
  15.   public
  16.     { Public declarations }
  17.   end;
  18.  
  19.   TDRemoteControl = class( TCustomControl )
  20.   protected
  21.     procedure WMSize(Var Message: TWMSize); message WM_Size;
  22.   end;
  23.  
  24. var
  25.   Form1: TForm1;
  26.  
  27. implementation
  28. {$R *.DFM}
  29.  
  30. procedure TDRemoteControl.WMSize;
  31. begin
  32.   Caption := '[OdiE -97] Width: '+ IntToStr( Width )+', Height: '+IntToStr(Height);
  33. end;
  34.  
  35. initialization
  36.   ReplaceParentClass(TPanel, TCustomControl, TDRemotecontrol);
  37. finalization
  38.   ReplaceParentClass(TPanel, TDRemotecontrol, TCustomControl);
  39. end.
  40.