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

📄 inputbox4.c

📁 学生成绩管理系统,C语言开发,图形界面,希望对大家有所帮助
💻 C
字号:
/*以下为录入对话框及其处理函数。*/ 
#include"AskBox3.c" 

#define inputX 250 
#define inputY 200 
#define upleftX 104 
#define upleftY 55 
#define uprightX 330 
#define uprightY 58 
#define downleftX 100 
#define downleftY 131 
#define downrightX 328 
#define downrightY 131 
#define changecolorred 235 
#define changecolorgreen 88 
#define changecolorblue 4 
#define contineX inputX+200 
#define contineY inputY+200 
#define nextX inputX+355 
#define nextY inputY+200 
char *Ich1="姓名:",*Ich2="学号:",*Ich3="科目:",*Ich4="成绩:"; 
char *Ibiaoti1="录入与处理",*winname="input.bmp",*Ich5="继续",*Ich6="下一个"; 
void InitInputBox(void){ 
showbmprealcolor32(winname,inputX,inputY); 
showbmprealcolor32(close1,inputX+480,inputY+6); 
chinashow24(Ibiaoti1,inputX+27,inputY+3,255,255,255,15,0,1,1); 
chinashow24(Ich1,inputX+10,inputY+51,4,88,235,1,0,1,1); 
chinashow24(Ich2,inputX+235,inputY+51,4,88,235,1,0,1,1); 
chinashow24(Ich3,inputX+10,inputY+127,4,88,235,1,0,1,1); 
chinashow24(Ich4,inputX+235,inputY+127,4,88,235,1,0,1,1); 
chinashow24(Ich5,contineX ,contineY ,4,88,235,1,0,1,1); 
chinashow24(Ich6,nextX,nextY,4,88,235,1,0,1,1); 
} 
int GetMouse(void){ 
int i=0,j=0,Ich5k=0,Ich6k=0; 
UpdateMouse(); 
while(1) 
{ 
UpdateMouse(); 
if(mouseinbox(inputX+480,inputX+500,inputY+6,inputY+26)==1&amt;&amt;j==0) 
{ 
showbmprealcolor32(close2,inputX+480,inputY+6); 
j=1; 
} 
if(mouseinbox(inputX+480,inputX+500,inputY+6,inputY+26)==0&amt;&amt;j==1) 
{ 
showbmprealcolor32(close1,inputX+480,inputY+6); 
j=0; 
} 
if(mouseinbox(inputX+480,inputX+500,inputY+6,inputY+26)==1) 
{ 
if(leftpress()==1) 
{ 
MouseOff(); 
return(0); 
} 
} 
/*........................*/ 
if(mouseinbox(contineX,contineX+60,contineY,contineY+24)==1&amt;&amt;Ich5k==0) 
{ 
chinashow24(Ich5,contineX,contineY,changecolorred,changecolorgreen,changecolorblue,1,0,1,1); 
Ich5k=1; 
} 
if(mouseinbox(contineX,contineX+60,contineY,contineY+24)==0&amt;&amt;Ich5k==1) 
{ 
chinashow24(Ich5,contineX ,contineY ,4,88,235,1,0,1,1); 
Ich5k=0; 
} 
if(mouseinbox(contineX,contineX+60,contineY,contineY+24)==1) 
{ 
if(leftpress()==1) 
{ 
MouseOff(); 
chinashow24(Ich5,contineX ,contineY ,4,88,235,1,0,1,1); 
return(1); 
} 
} 
/*........................*/ 
if(mouseinbox(nextX,nextX+90,nextY,nextY+24)==1&amt;&amt;Ich6k==0) 
{ 
chinashow24(Ich6,nextX,nextY,changecolorred,changecolorgreen,changecolorblue,1,0,1,1); 
Ich6k=1; 
} 
if(mouseinbox(nextX,nextX+90,nextY,nextY+24)==0&amt;&amt;Ich6k==1) 
{ 
chinashow24(Ich6,nextX,nextY ,4,88,235,1,0,1,1); 
Ich6k=0; 
} 
if(mouseinbox(nextX,nextX+90,nextY,nextY+24)==1) 
{ 
if(leftpress()==1) 
{ 
MouseOff(); 
chinashow24(Ich6,nextX,nextY ,4,88,235,1,0,1,1); 
return(2); 
} 
} 
} 
} 
void Iinitstdinfor(struct stdinfor *head){ 
ShowReadKey(downleftX,downleftY,0); 
strcpy(head->objectname,askedname); 
InitAskData(); 
ShowReadKey(downrightX,downrightY,0); 
strcpy(head->cdegree,askedname); 
head->degree=trans_asc_to_nu(head->cdegree); 
InitAskData(); 
fill_area(BoxX+downleftX,BoxX+downleftX+110,BoxY+downleftY,BoxY+downleftY+24,bkred,bkgreen,bkblue,0); 
fill_area(BoxX+downrightX,BoxX+downrightX+110,BoxY+downrightY,BoxY+downrightY+24,bkred,bkgreen,bkblue,0); 
} 
void Iinitstudent(struct student *head){ 
ShowReadKey(upleftX,upleftY,0); 
strcpy(head->stdname,askedname); 
InitAskData(); 
ShowReadKey(uprightX,uprightY,0); 
strcpy(head->stdnumber,askedname); 
InitAskData(); 
} 
struct stdinfor *Imakechain1(void){ 
struct stdinfor *head,*fore,*back; 
int i; 
fore=(struct stdinfor *)malloc(sizeof(struct stdinfor)); 
head=fore; 
back=fore; 
Iinitstdinfor(head); 
while(GetMouse()==1) 
{ 
fore=(struct stdinfor *)malloc(sizeof(struct stdinfor)); 
back->stdp=fore; 
Iinitstdinfor(fore); 
back=fore; 
} 
back->stdp=NULL; 
fill_area(BoxX+upleftX,BoxX+upleftX+110,BoxY+upleftY,BoxY+upleftY+24,bkred,bkgreen,bkblue,0); 
fill_area(BoxX+uprightX,BoxX+uprightX+110,BoxY+uprightY,BoxY+uprightY+24,bkred,bkgreen,bkblue,0); 
return(head); 
} 
struct student * Imakechain(void){ /*...................................*/ 
struct student *head,*fore,*back; 
struct stdinfor *head1; 
int i; 
fore=(struct student *)malloc(sizeof(struct student)); 
head=fore; 
back=fore; 
Iinitstudent(head); 
head->stdhead=Imakechain1(); 
while(GetMouse()==2) 
{ 
fore=(struct student *)malloc(sizeof(struct student)); 
back->stup=fore; 
Iinitstudent(fore); 
head1=Imakechain1(); 
fore->stdhead=head1; 
back=fore; 
} 
back->stup=NULL; 
return(head); 
} 
void ShowInputBox(void){ 
InitInputBox(); 
MainHead=Imakechain(); 
} 






⌨️ 快捷键说明

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