home *** CD-ROM | disk | FTP | other *** search
- (***************************************
- * WG-VISION 1.0 BEISPIELPROGRAMM *
- ****************************************
- * *
- * Fenster mit Zählschalter *
- * *
- ****************************************
- * (c) 1993 Dipl.Phys. Mathias Scholz *
- ***************************************)
-
- {$I COMPILER.INC}
-
- program NumbTest;
-
- uses WDecl,
- WEvent,
- WApp,
- WDlg;
-
- const cmNewWindow=101;
-
- type TApplication=object(TApp)
- procedure InitMenuBar; virtual;
- procedure SetDialogData; virtual;
- procedure HandleEvent; virtual;
- procedure NewWindow;
- end;
-
- PNewWindow=^TNewWindow;
- TNewWindow=object(TDlgWindow)
- constructor Init;
- end;
-
- tPrintPages=record
- Schalter:string[4];
- VonSeite:string[3];
- BisSeite:string[3];
- Exemplare:string[2];
- end;
-
- var MyApp:TApplication;
- PPages:tPrintPages;
-
-
- {Implementation TApplication}
-
- procedure TApplication.InitMenuBar;
- begin
- MainMenu('~F~enster',0);
- SubMenu('~T~estfenster',cmNewWindow,0,0,false,false);
- SubMenu('E~x~it Alt-X',cmCloseApplication,0,altX,false,false);
- end;
-
- procedure TApplication.SetDialogData;
- begin
- with PPages do
- begin
- Schalter:='SLLL';
- VonSeite:=' 1';
- BisSeite:=' 1';
- Exemplare:=' 1';
- end;
- end;
-
- procedure TApplication.HandleEvent;
- begin
- TProgram.HandleEvent;
- case Event.Command of
- cmNewWindow:NewWindow;
- end; {case}
- end;
-
- procedure TApplication.NewWindow;
- var Window:PNewWindow;
- begin
- Window:=New(PNewWindow, Init);
- InsertDesktop(Window);
- end;
-
- {Implementation TNewWindow}
-
- constructor TNewWindow.Init;
- var RR:TRect;
- begin
- RR.Assign(60,80,300,280);
- TDlgWindow.Init(RR,'Fenster mit Zählschalter',winDouble+winPanel+winMenu+winKey);
- SetStaticText(20,40,'Dokument drucken',LeftText);
- ChangePalColor(10,Red);
- SetNumButton(20,100,3,'~V~on',3,1,1,999,1,3.0);
- SetNumButton(135,100,3,'~B~is',3,1,1,999,1,3.0);
- SetNumButton(40,155,2,'~E~xemplare',2,2,1,99,1,2.0);
- SetData(PPages);
- end;
-
- {Hauptprogramm}
-
- begin
- MyApp.Init('Fenster-Test');
- MyApp.Run;
- MyApp.Done;
- end.
-