type
TMain = Class
//private
FHandle: HWND;
FWidth, FHeight, FTop, FLeft: integer;
FCur: TCursorType;//HCURSOR;
FColor: Cardinal;
FCaption: string;
FBrush_BK : HBRUSH;
FDeviceContext: HDC;
FParent: TMain;
FOnClick: TEvent;
protected
procedure SetParent( val:TMain );
procedure SetCaption( val:string);
procedure SetCur( val: TCursorType);
procedure SetLeft( Val: Integer);
procedure SetTop( Val: Integer);
procedure SetWidth( Val: Integer);
procedure SetHeight( Val : Integer);
procedure UpdateSize();
procedure SetColor( val: Cardinal);
procedure Click();
public
destructor Destroy();override;
constructor Create(Parent_:TMain=nil; Style_: Integer=0);
function HasFocus(): Boolean;
property Top: integer read FTop write SetTop;
property Left: integer read FLeft write SetLeft;
property Width: integer read FWidth write SetWidth;
property Height: integer read FHeight write SetHeight;
property
Handle: HWND read FHandle;
property Cursor : TCursorType read FCur write SetCur;
property Color: Cardinal read FColor write SetColor;
property Caption: string read FCaption write SetCaption;
property DeviceContext: HDC read FDeviceContext;
property Parent: TMain read FParent write SetParent;
end;