home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l040 / 11.ddi / WDOCDEMO.ZIP / STEP01B.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-10-27  |  1011 b   |  40 lines

  1. {************************************************}
  2. {                                                }
  3. {   ObjectWindows Demo                           }
  4. {   Copyright (c) 1992 by Borland International  }
  5. {                                                }
  6. {************************************************}
  7.  
  8. program Step01b;
  9.  
  10. uses WinTypes, WinProcs, OWindows;
  11.  
  12. type
  13.   PStepWindow = ^TStepWIndow;
  14.   TStepWindow = object(TWindow)
  15.     procedure WMLButtonDown(var Msg: TMessage);
  16.       virtual wm_First + wm_LButtonDown;
  17.   end;
  18.   TMyApplication = object(TApplication)
  19.     procedure InitMainWindow; virtual;
  20.   end;
  21.  
  22. procedure TStepWindow.WMLButtonDown(var Msg: TMessage);
  23. begin
  24.   MessageBox(HWindow, 'You have pressed the left mouse button',
  25.   'Message Dispatched', mb_OK);
  26. end;
  27.  
  28. procedure TMyApplication.InitMainWindow;
  29. begin
  30.   MainWindow := New(PStepWindow, Init(nil, 'Steps'));
  31. end;
  32.  
  33. var
  34.   MyApp: TMyApplication;
  35.  
  36. begin
  37.   MyApp.Init('Steps');
  38.   MyApp.Run;
  39.   MyApp.Done;
  40. end.