#include
#include
#include
#include
void hyjiemian();
void setwords(int x,int y,int z,int a,int color,char *p);
int main()
{
int driver,mode;
driver=VGA;mode=VGAHI;
initgraph(&driver,&mode,"c:\\BORLANDC\\BGI");
hyjiemian();
setwords(int x,int y,int z,int a,int color,char *p);
setbkcolor(YELLOW);
{
setcolor(RED);
circle(30,20,6);
circle(30,20,12);
}
getch();
closegraph();
return 0;
}
void hyjiemian()
{
char *p1="网上购物系统";
char *p2="欢迎您";
setbkcolor(BLACK);
setwords(110,50,20,3,RED,p1);
setwords(111,51,20,3,YELLOW,p1);
setwords(112,52,20,3,RED,p1);
setwords(210,200,20,3,RED,p2);
}
void setwords(int x,int y,int z,int a,int color,char *p)
{
unsigned g,flag=0;
unsigned char qh,wh;
unsigned long offset;
char buffer[32];
FILE *fp;
register m,n,i,j,k;
if((fp=fopen("C:\\borlandc\\HZK\\HZK16","rb"))==NULL)
{
printf("can't open hzk16,please add it");
getch();
exit(0);
}
while((g=*p++)!=0)
if(g>0xa1)
{
if(flag==0)
{
qh=(g-0xa1)&0x7f;
flag=1;
}
else
{
wh=(g-0xa1)&0x7f;
flag=0;
offset=(94*qh+wh)*32L;
fseek(fp,offset,SEEK_SET);
fread(buffer,32,1,fp);
for(i=0;i<16;i++)
{
for(m=0;m<=a;m++)
{
for(j=0;j<2;j++)
{
for(k=0;k<8;k++)
{
for(n=0;n<=a;n++)
{
if((buffer[i*2+j])&(0x80>>k))
{
putpixel(x+j*8*a+k*a+n,y+i*a+n,color);
}
}
}
}
}
}
x=x+16*a+z;
}
}
fclose(fp);
}