home *** CD-ROM | disk | FTP | other *** search
- (*******************************************************************)
- (* *)
- (* Microworks ObjectMate 2.6 *)
- (* *)
- (* Windows Interface Develpment Kit the Borland Languages. *)
- (* *)
- (* SFXDLG.PAS : Basic SFX dialog box *)
- (* *)
- (* Copyright 1992-94 Microworks Sydney, Australia. *)
- (* *)
- (*******************************************************************)
-
- (* The SFX dialog sample creates basic SFX dialog using the modifiable class
- * 'SFXDlg'. This class lets you set the dialog style by passing one or more
- * of the ObjectMate window style flags in the Attr.Param field. The constructor
- * lists all the possible style flag variations and SetupWindow uses the
- * 'CenterWindow' function to center the dilaog box over the desktop window.
- *)
-
- program SFXDlg;
-
- uses WinTypes, WinProcs, SFX200,
- {$IFDEF Ver15}
- WObjects;
- {$ELSE}
- Objects, OWindows, ODialogs;
- {$ENDIF}
-
- {$R SFXDlg.res}
-
- const
-
- AppName : PChar = 'SFXDialog';
-
- type
-
- PSFXDialog = ^TSFXDialog;
- TSFXDialog = object(TDialog)
- constructor Init(AParent: PWindowsObject; AName: PChar);
- destructor Done; virtual;
- procedure SetUpWindow; virtual;
- procedure WMPaint (var Msg: TMessage); virtual wm_First + wm_Paint;
- end;
-
- PSFXApp = ^TSFXApp;
- TSFXApp = object(TApplication)
- procedure InitMainWindow; virtual;
- end;
-
- {********** TSFXApp **********}
-
- procedure TSFXApp.InitMainWindow;
- begin
- MainWindow := New(PSFXDialog, Init(nil, 'SFXDialog'));
- end;
-
- {********** TSFXDialog **********}
-
- constructor TSFXDialog.Init(AParent: PWindowsObject; AName: PChar);
- begin
- TDialog.Init(AParent, AName);
- {Attr.Param := mws_FramedClient;}
- {Attr.Param := mws_RaisedClient;}
- {Attr.Param := mws_Glaze;}
- {Attr.Param := mws_Steel;}
- {Attr.Param := mws_SFXFrame;}
- {Attr.Param := mws_3DFrame;}
- {Attr.Param := mws_3DGlaze;
- {Attr.Param := mws_3DSteel;}
- {Attr.Param := mws_Framed3DFrame;}
- {Attr.Param := mws_Framed3DGlaze}
- {Attr.Param := mws_Framed3DSteel;}
- {Attr.Param := mws_Raised3DFrame;}
- {Attr.Param := mws_Raised3DGlaze;}
- Attr.Param := mws_Raised3DSteel;
- {Attr.Param := Attr.Param or MWS_SFXCAPTION;}
- end;
-
- destructor TSFXDialog.Done;
- begin
- TDialog.Done;
- end;
-
- procedure TSFXDialog.SetUpWindow;
- begin
- TDialog.SetUpWindow;
- CenterWindow(0, HWindow);
- end;
-
- procedure TSFXDialog.WMPaint (var Msg: TMessage);
- begin
- TDialog.DefWndProc(Msg);
- end;
-
- {********** Main program **********}
-
- var
- App: TSFXApp;
- begin
- App.Init(AppName);
- App.Run;
- App.Done;
- end.
-