1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57:
| program rakete; uses WObjects, WinTypes, WinProcs;
const
id_edit1=1; id_edit2=2; id_edit3=3; id_button1=1;
type
rakprog = object(tapplication) procedure initmainwindow;virtual; end;
ptestwindow=^testwindow; testwindow = object (TWindow)
edit1,edit2,edit3:pedit; button1:pbutton; constructor Init(AParent: PWindowsObject; ATitle: PChar); procedure HandleButton1Msg(var Msg: TMessage); virtual id_First + id_button1; end;
constructor testwindow.init(AParent: PWindowsObject; ATitle: PChar); begin TWindow.Init(AParent, ATitle); edit1 := New(PEdit, Init(@Self, id_edit1, '0', 990, 50, 150, 30, 0, False)); edit2 := New(PEdit, Init(@Self, id_edit2, '0', 990, 95, 150, 30, 0, False)); edit3 := New(PEdit, Init(@Self, id_edit3, '0', 990, 140, 150, 30, 0, False)); button1 := New(PButton, Init(@Self, id_button1, '-->', 990, 300, 50, 30,false)); end;
pprocedure TestWindow.HandleButton1Msg(var Msg: TMessage); var
begin
end;
procedure rakprog.initmainwindow; begin MainWindow := New(PTestWindow, Init(nil, 'rakete')); end;
var rak :rakprog;
begin rak.init('rakete'); rak.run; rak.done; end. |