home *** CD-ROM | disk | FTP | other *** search
- PROGRAM Generic2;
-
- {$R Generic2}
-
- USES WinTypes, WinProcs, OWindows, ODialogs;
-
- CONST
- cm_About = 100;
- AppName = 'Generic2';
-
- TYPE
- pMyWindow = ^tMyWindow;
- tMyWindow = OBJECT (tWindow)
- CONSTRUCTOR Init (aParent: pWindowsObject; aTitle: pChar);
- PROCEDURE cmAbout (VAR Message: tMessage); VIRTUAL cm_First + cm_About;
- END;
-
- tMyApplication = OBJECT (tApplication)
- PROCEDURE InitMainWindow; VIRTUAL;
- END;
-
- CONSTRUCTOR tMyWindow.Init (aParent: pWindowsObject; aTitle: pChar);
- BEGIN
- tWindow.Init (aParent, aTitle);
- Attr.Menu := LoadMenu (hInstance, AppName);
- END;
-
- PROCEDURE tMyWindow.cmAbout (VAR Message: tMessage);
- VAR
- Dialog: pDialog;
- BEGIN
- Dialog := New (pDialog, Init (@Self, MakeIntResource('AboutBox')));
- Dialog^.Execute;
- Dialog^.Done;
- END;
-
- PROCEDURE tMyApplication.InitMainWindow;
- BEGIN
- MainWindow := New (pMyWindow, Init (NIL, 'Borland Pascal OWL Generic'));
- END;
-
- VAR
- GenericApp: tMyApplication;
-
- BEGIN
- GenericApp.Init ('OWLGeneric');
- GenericApp.Run;
- GenericApp.Done;
- END.
-