home *** CD-ROM | disk | FTP | other *** search
- (*******************************************************************)
- (* *)
- (* Microworks ObjectMate 2.6 *)
- (* *)
- (* Windows Interface Develpment Kit the Borland Languages. *)
- (* *)
- (* SFXEDIT.PAS : Basic SFX edit window *)
- (* *)
- (* Copyright 1992-94 Microworks Sydney, Australia. *)
- (* *)
- (*******************************************************************)
-
- (* The SFX edit sample displays a TSFXEditWindow. There are only two styles you
- * can use with an SFX Edit, File or MDI window: MWS_3DFRAME or MWS_SFXFRAME.
- *)
-
- program SFXEdit;
-
- uses WinTypes, WinProcs, SFX200, SFXWnds,
- {$IFDEF Ver15}
- WObjects, StdWnds, StdDlgs;
- {$ELSE}
- Objects, OWindows, ODialogs, OStdWnds, OStdDlgs;
- {$ENDIF}
-
- type
-
- PNewEditWindow = ^TNewEditWindow;
- TNewEditWindow = object(TSFXEditWindow)
- constructor Init(AParent: PWindowsObject; ATitle: PChar);
- end;
-
- PNewEditApp = ^TNewEditApp;
- TNewEditApp = object(TApplication)
- procedure InitMainWindow; virtual;
- procedure InitInstance; virtual;
- end;
-
- (********** TNewEditWindow **********)
-
- constructor TNewEditWindow.Init(AParent: PWindowsObject; ATitle: PChar);
- begin
- TSFXEditWindow.Init(AParent, ATitle);
- {Attr.Style := Attr.Style or mws_3DFrame or mws_SFXCaption;}
- Attr.Style := Attr.Style or mws_SFXFrame or mws_SFXCaption;
- Attr.Menu := LoadMenu(HInstance, 'EditCommands');
- end;
-
- {********** TNewEditApp **********}
-
- procedure TNewEditApp.InitMainWindow;
- begin
- MainWindow := New(PNewEditWindow, Init(nil, 'SFX Edit Window'));
- end;
-
- procedure TNewEditApp.InitInstance;
- begin
- TApplication.InitInstance;
- HAccTable := LoadAccelerators(HInstance, 'EditCommands');
- end;
-
- {********** Main Progam **********}
-
- var
- App : TNewEditApp;
- begin
- App.Init('NewEditApp');
- App.Run;
- App.Done;
- end.
-