home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / windows / c / mobjm260 / sfxwin.pa_ / sfxwin.pa
Encoding:
Text File  |  1994-09-06  |  3.2 KB  |  112 lines

  1. (*******************************************************************)
  2. (*                                                                 *)
  3. (*          Microworks ObjectMate 2.6                                                      *)
  4. (*                                                                 *)
  5. (*     Windows Interface Develpment Kit the Borland Languages.     *)
  6. (*                                                                 *)
  7. (*         SFXWIN.PAS : Basic SFX window                                   *)
  8. (*                                                                                                                           *)
  9. (*     Copyright 1992-94 Microworks Sydney, Australia.               *)
  10. (*                                                                 *)
  11. (*******************************************************************)
  12.  
  13. (* The SFX window sample creates basic SFX window that lets you set the SFX
  14.  * window style by passing one or more of the ObjectMate window style flags
  15.  * in the Attr.Style field. The constructor lists all the possible style flag
  16.  * variations.
  17.  *)
  18.  
  19. program SFXWIN;
  20.  
  21. uses WinTypes, WinProcs, SFX200,
  22.          {$IFDEF Ver15}
  23.              WObjects;
  24.          {$ELSE}
  25.              Objects, OWindows, ODialogs;
  26.          {$ENDIF}
  27.  
  28. const
  29.  
  30.     AppName : PChar = 'NewSFXWindow';
  31.  
  32. type
  33.  
  34.     PNewSFXWindow = ^TNewSFXWindow;
  35.     TNewSFXWindow = object(TSFXWindow)
  36.         constructor Init(AParent: PWindowsObject; AName: PChar);
  37.         destructor Done; virtual;
  38.         function  GetClassName : PChar; virtual;
  39.         procedure GetWindowClass(var AWndClass: TWndClass); virtual;
  40.         procedure SetUpWindow; virtual;
  41.         procedure WMPaint (var Msg: TMessage); virtual wm_First + wm_Paint;
  42.     end;
  43.  
  44.     PNewSFXApp = ^TNewSFXApp;
  45.     TNewSFXApp = object(TApplication)
  46.         procedure InitMainWindow; virtual;
  47.     end;
  48.  
  49. {********** TNewSFXApp **********}
  50.  
  51. procedure TNewSFXApp.InitMainWindow;
  52. begin
  53.     MainWindow := New(PNewSFXWindow, Init(nil, 'SFX Window'));
  54. end;
  55.  
  56. {********** TNewSFXWindow **********}
  57.  
  58. constructor TNewSFXWindow.Init(AParent: PWindowsObject; AName: PChar);
  59. begin
  60.     TSFXWindow.Init(AParent, AName);
  61.     {Attr.Style := Attr.Style or mws_FramedClient;}
  62.     {Attr.Style := Attr.Style or mws_RaisedClient;}
  63.     {Attr.Style := Attr.Style or mws_Glaze;}
  64.     {Attr.Style := Attr.Style or mws_Steel;}
  65.     Attr.Style := Attr.Style or mws_SFXFrame;
  66.     {Attr.Style := Attr.Style or mws_3DFrame;}
  67.     {Attr.Style := Attr.Style or mws_3DGlaze;
  68.     {Attr.Style := Attr.Style or mws_3DSteel;}
  69.     {Attr.Style := Attr.Style or mws_Framed3DFrame;}
  70.     {Attr.Style := Attr.Style or mws_Framed3DFrame}
  71.     {Attr.Style := Attr.Style or mws_Framed3DSteel;}
  72.     {Attr.Style := Attr.Style or mws_Raised3DFrame;}
  73.     {Attr.Style := Attr.Style or mws_Raised3DGlaze;}
  74.     {Attr.Style := Attr.Style or mws_Raised3DSteel;}
  75.     Attr.Style := Attr.Style or mws_SFXCaption;
  76. end;
  77.  
  78. destructor TNewSFXWindow.Done;
  79. begin
  80.     TSFXWindow.Done;
  81. end;
  82.  
  83. function TNewSFXWindow.GetClassName;
  84. begin
  85.     GetClassName := AppName;
  86. end;
  87.  
  88. procedure TNewSFXWindow.GetWindowClass(var AWndClass: TWndClass);
  89. begin
  90.     TSFXWindow.GetWindowClass(AWndClass);
  91. end;
  92.  
  93. procedure TNewSFXWindow.SetUpWindow;
  94. begin
  95.     TSFXWindow.SetUpWindow;
  96. end;
  97.  
  98. procedure TNewSFXWindow.WMPaint (var Msg: TMessage);
  99. begin
  100.     TSFXWindow.WMPaint(Msg);
  101. end;
  102.  
  103. {********** Main program **********}
  104.  
  105. var
  106.     App: TNewSFXApp;
  107. begin
  108.     App.Init(AppName);
  109.     App.Run;
  110.     App.Done;
  111. end.
  112.