⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ll.c

📁 tuobc图形界面 学生管理 实现管理各功能
💻 C
字号:
#include"graphics.h"
#include"dos.h"
#include"alloc.h"
#include"stdlib.h"
#include"stdio.h"
#include"xuesheng.c"

#define ALT_R 19
#define ALT_O 24
#define ALT_F 33
#define ALT_S 31
#define ALT_C 46
#define ALT_P 25
#define ALT_I 23
#define ALT_D 32
#define ALT_X 45
#define ALT_E 18
#define KEY_ESC 27
#define KEY_LEFT 75
#define KEY_RIGHT 77
#define KEY_UP 72
#define KEY_DOWN 80
#define KEY_ENTER 13

void main()
{

	int choice,i,j;struct student stu[N];struct student t;
	int size;
	char c;
	void *buff=NULL;
	int graphdriver=DETECT,graphmode;
	initgraph(&graphdriver,&graphmode,"");


		
		do{	
	setviewport(100,100,540,380,1);
	setcolor(YELLOW);
	setfillstyle(1,BLUE);
	setbkcolor(BROWN);
	bar(0,0,440,280);
	rectangle(0,0,440,280);
/*	floodfill(101,101,BLACK);
	bar(60,30,380,90);
	rectangle(60,30,380,90);
*/   
	settextstyle(0,0,2);
	bar(250,220,350,260);
	rectangle(250,220,350,260);	
	rectangle(255,225,345,255);
	outtextxy(263,235,"ENTER");
	outtextxy(15,60,"WELCOME INTO THIS SYSTERM !");

	  /* 	for(j=0;j<80;j++)
	   {
		   place(18,j);
		   printf("%d",j);
	   }
		for(j=0;j<80;j++)
		   {
		   place(j,18);
		   printf("%d",j);
		   }

*/
	c=getch();
		}while(KEY_ENTER!=c);


	cleardevice();

    
	settextstyle(0,0,1);
	setviewport(130,100,510,400,1);/*画框*/
	setcolor(YELLOW);
	rectangle(0,0,380,240);
    setbkcolor(BROWN);
	setfillstyle(1,BLUE);
	floodfill(101,101,YELLOW);
	rectangle(0,30,380,30);
	textcolor(YELLOW);


	outtextxy(9,10,"Creat");/*Input*/
	outtextxy(56,10,"Output");
	outtextxy(111,10,"Research");
	outtextxy(184,10,"Paixu");
	outtextxy(233,10,"Delete");
	outtextxy(290,10,"Insert");
	outtextxy(345,10,"Statistics");
/*	outtextxy(10,10,"Insert");
	outtextxy(65,10,"Output");
	outtextxy(125,10,"Research");
	outtextxy(200,10,"Paixu");
	outtextxy(260,10,"Delete");
	size=imagesize(0,0,350,250);
*/
	buff=malloc(size);
	getimage(0,0,380,240,buff);
	for(;;)
	{
		c=getch();
		switch(c)
		{
		case KEY_ESC:

			setviewport(100,100,540,380,1);
			setcolor(BLUE);
			setfillstyle(1,LIGHTCYAN);
			setbkcolor(YELLOW);
			bar(0,0,440,280);
			rectangle(0,0,440,280);
			settextstyle(0,0,2);
			outtextxy(15,60,"THANKS FOR USING ");
			outtextxy(200,100,"THIS SESYERM !");
			settextstyle(1,0,6);
			outtextxy(100,200,"GOOD BEY!");
			
			getch();

			if(buff!=NULL) free(buff);
			closegraph();
			exit(0);
		case ALT_C:
			
			input(stu,buff);
			cleardevice();
			putimage(0,0,buff,COPY_PUT);
			break;
		case ALT_O:
			cleardevice();
			putimage(0,0,buff,COPY_PUT);
			output(stu);
			cleardevice();
			putimage(0,0,buff,COPY_PUT);
			break;
		case ALT_R:
			
			search(stu,buff);
			cleardevice();
			putimage(0,0,buff,COPY_PUT);
			break;
		case ALT_D:
			cleardevice();
			putimage(0,0,buff,COPY_PUT);
			clear(stu);
			cleardevice();
			putimage(0,0,buff,COPY_PUT);
			break;
		case ALT_S:
			cleardevice();
			putimage(0,0,buff,COPY_PUT);
			statistics(stu);
			cleardevice();
			putimage(0,0,buff,COPY_PUT);
			break;
		case ALT_I:
			cleardevice();
			putimage(0,0,buff,COPY_PUT);
			insert(stu);
			cleardevice();
			putimage(0,0,buff,COPY_PUT);
			break;

		case ALT_P:
			cleardevice();
			putimage(0,0,buff,COPY_PUT);
			sort(stu);
			cleardevice();
			putimage(0,0,buff,COPY_PUT);
			break;
		}
	

	}
	

	getch();

	
	closegraph();
}
int place(int placex,int placey)
{
/*	asm mov ah,2;
        asm mov bh,1;
	asm mov dh,placey;
	asm mov dl,placex;
	asm int 10H; */
	union REGS Inr;
	Inr.h.bh=0;
	Inr.h.ah=02;
	Inr.h.dh=placey;
	Inr.h.dl=placex;
	int86(0x10,&Inr,&Inr);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -