home *** CD-ROM | disk | FTP | other *** search
- {*************************************************************************}
- {* *}
- {* Project : *}
- {* Program : Uhr.Pas *}
- {* *}
- {* Author : Uwe Janiak *}
- {* Firm : *}
- {* Adress : 1055 Berlin, Grellstra▀e 63 *}
- {* *}
- {* Created : Montag, den 10. August 1992 um 22:06:06 Uhr *}
- {* Update : *}
- {* *}
- {* Version : Basic source created by Dialog Engine 1.5 *}
- {* *}
- {*************************************************************************}
-
- uses WinTypes, WinProcs, WObjects, WinTools, Uhr;
-
- Type PMainWindow = ^TMainWindow;
- TMainWindow = Object(TWindow)
- constructor Init(ATitel:PChar);
- procedure SetupWindow;virtual;
- procedure wmclose(var msg:tmessage);virtual wm_first+wm_close;
- end;
-
- TEngineApp=Object(TApplication)
- procedure InitMainWindow;virtual;
- end;
-
- var EngineApp:TEngineApp;
-
- constructor TMainWindow.Init(ATitel:PChar);
- begin
- TWindow.Init(nil,ATitel);
- end;
-
- procedure TMainWindow.SetupWindow;
- var d:PUhr;
- begin
- TWindow.SetupWindow;
- ShowWindow(hWindow,sw_hide);
- d:=New(PUhr,Init(@self,'DIALOG_1'));
- Application^.ExecDialog(D);
- PostMessage(hWindow,wm_close,0,0);
- if not readwindowposition(hwindow,15,inifile,'Main','WindowState') then
- showwindow(hwindow,sw_normal);
- end;
-
- procedure TMainWindow.wmClose;
- begin
- writewindowposition(hwindow,15,inifile,'Main','WindowState');
- TWindow.wmClose(msg);
- end;
-
- procedure TEngineApp.InitMainWindow;
- begin
- MainWindow:=New(PMainWindow,Init('Parent Window'));
- end;
-
- var hlib:thandle;i:integer;
- begin
- If hPrevInst<>0 then
- begin
- Message(paramstr(0)+' lΣuft schon!',33);
- exit;
- end;
- hlib:=LoadLibrary('BWCC.DLL');
- if hlib<32 then
- begin
- Message('Die Datei BWCC.DLL konnte nicht geladen werden.',0);
- exit;
- end;
- GetDir(0,IniFile);
- IniFile:=copy(paramstr(0),1,pos('.',paramstr(0)))+'Ini';
- EngineApp.Init('EngineAPP');
- EngineApp.Run;
- EngineApp.Done;
- Freelibrary(hlib);
- end.
-