home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 8
/
CDASC08.ISO
/
VRAC
/
BP70LIB.ZIP
/
WINTEST.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1993-04-15
|
1KB
|
86 lines
program wintest;
uses graph,generic,graf3,graf,winlib;
const bak=11;
fill=9;
procedure drawcontents(p:winptr);
begin
winport(p);
clsgraf(14,1);
saywin(100,100,10,1,2,0,1,1,1,1,1,1,'Hi',p);
grafportoff;
end;
procedure runcontents(p:winptr);
begin
beep(1000,50);
end;
var p:winptr; dproc:procedure; w:winrec;
begin
randomize; { needed for random stars in clsstars }
grafon;
resetmouse;
p:=nil;
clsgraf(bak,fill);
with w do
begin
x1:=300;
y1:=300;
x2:=700;
y2:=700;
width:=700;
height:=700;
wintype:=1;
zoom:=0;
wincol:=7;
scrollcol:=7;
btncol:=7;
btntxt:=14;
titletxt:=11;
titlebak:=8;
scrollrate:=1;
ox1:=x1;
ox2:=x2;
oy1:=y1;
oy2:=y2;
ix:=100;
iy:=100;
xoff:=0;
yoff:=0;
title:='WinLib Window';
next:=nil;
data:=nil;
redraw:=false;
end;
openwin(p,w);
drawwin(p);
drawcontents(p);
sm;
repeat
if mousebutton<>0 then
begin
hm;
if runwin(p,p,bak,fill,drawcontents,runcontents,true) then
begin
closewin(p,p);
closegraph;
halt;
end;
sm;
end;
until false;
end.