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

  1. (*******************************************************************)
  2. (*                                                                 *)
  3. (*          Microworks ObjectMate 2.6                                                      *)
  4. (*                                                                 *)
  5. (*     Windows Interface Develpment Kit the Borland Languages.     *)
  6. (*                                                                 *)
  7. (*         SFXEDIT.PAS : Basic SFX edit window                             *)
  8. (*                                                                                                                           *)
  9. (*     Copyright 1992-94 Microworks Sydney, Australia.               *)
  10. (*                                                                 *)
  11. (*******************************************************************)
  12.  
  13. (* The SFX edit sample displays a TSFXEditWindow. There are only two styles you
  14.  * can use with an SFX Edit, File or MDI window: MWS_3DFRAME or MWS_SFXFRAME.
  15.  *)
  16.  
  17. program SFXEdit;
  18.  
  19. uses WinTypes, WinProcs, SFX200, SFXWnds,
  20.          {$IFDEF Ver15}
  21.              WObjects, StdWnds, StdDlgs;
  22.          {$ELSE}
  23.              Objects, OWindows, ODialogs, OStdWnds, OStdDlgs;
  24.          {$ENDIF}
  25.  
  26. type
  27.  
  28.     PNewEditWindow = ^TNewEditWindow;
  29.     TNewEditWindow = object(TSFXEditWindow)
  30.     constructor Init(AParent: PWindowsObject; ATitle: PChar);
  31.   end;
  32.  
  33.     PNewEditApp = ^TNewEditApp;
  34.     TNewEditApp = object(TApplication)
  35.     procedure InitMainWindow; virtual;
  36.     procedure InitInstance; virtual;
  37.   end;
  38.  
  39. (********** TNewEditWindow **********)
  40.  
  41. constructor TNewEditWindow.Init(AParent: PWindowsObject; ATitle: PChar);
  42. begin
  43.     TSFXEditWindow.Init(AParent, ATitle);
  44.     {Attr.Style := Attr.Style or mws_3DFrame or mws_SFXCaption;}
  45.     Attr.Style := Attr.Style or mws_SFXFrame or mws_SFXCaption;
  46.     Attr.Menu := LoadMenu(HInstance, 'EditCommands');
  47. end;
  48.  
  49. {********** TNewEditApp **********}
  50.  
  51. procedure TNewEditApp.InitMainWindow;
  52. begin
  53.     MainWindow := New(PNewEditWindow, Init(nil, 'SFX Edit Window'));
  54. end;
  55.  
  56. procedure TNewEditApp.InitInstance;
  57. begin
  58.   TApplication.InitInstance;
  59.   HAccTable := LoadAccelerators(HInstance, 'EditCommands');
  60. end;
  61.  
  62. {********** Main Progam **********}
  63.  
  64. var
  65.     App : TNewEditApp;
  66. begin
  67.     App.Init('NewEditApp');
  68.     App.Run;
  69.     App.Done;
  70. end.
  71.