home *** CD-ROM | disk | FTP | other *** search
- {************************************************}
- { }
- { ObjectWindows Demo }
- { Copyright (c) 1992 by Borland International }
- { }
- {************************************************}
-
- program Step01b;
-
- uses WinTypes, WinProcs, OWindows;
-
- type
- PStepWindow = ^TStepWIndow;
- TStepWindow = object(TWindow)
- procedure WMLButtonDown(var Msg: TMessage);
- virtual wm_First + wm_LButtonDown;
- end;
- TMyApplication = object(TApplication)
- procedure InitMainWindow; virtual;
- end;
-
- procedure TStepWindow.WMLButtonDown(var Msg: TMessage);
- begin
- MessageBox(HWindow, 'You have pressed the left mouse button',
- 'Message Dispatched', mb_OK);
- end;
-
- procedure TMyApplication.InitMainWindow;
- begin
- MainWindow := New(PStepWindow, Init(nil, 'Steps'));
- end;
-
- var
- MyApp: TMyApplication;
-
- begin
- MyApp.Init('Steps');
- MyApp.Run;
- MyApp.Done;
- end.