当前位置导航:炫浪网>>网络学院>>编程开发>>C++教程>>C++进阶与实例

a simple menu programme

    #include<conio.h>
    #include<stdio.h>
    main()
    {
     strUCt text_info r;
     int col=16,row=6;
     char *info1="            WELCOME TO THE STUDENT MANAGE SYSTEM";

     char *info2="                            Contact Me:";
     char *info3="                            QQ:45569671";
     char *info4="                            MobilePhone:13186335317";
     char *info5="                            E-Mail:[email protected]";

     char *info6="                  Copyright ? 2003 SunJia Software Design Studio.";
     char *info7="                            All Rights Reserved.";

     char block[10000];/*this array uses to save the screen area*/


     /*save the original screen parameters and the background of the hinting window*/
     gettextinfo(&r);/*system function*/
     gettext(col,row,col+68,row+3,block);/*system function*/


     /*draw the hinting window*/
     textcolor(BLACK);/*system function*/
     textbackground(GREEN);/*system function*/
     window(col+1,row+1,col+68,row+8);/*system function*/
     clrscr();/*system function*/
     textbackground(RED);
     window(col,row,col+70,row+10);
     clrscr();
     gotoxy(22,8);
     puts("_______________________________________");
     gotoxy(22,6);
     puts("");
     gotoxy(22,8);
     puts("");
     gotoxy(60,6);
     puts("");
     gotoxy(60,8);
     puts("");
     gotoxy(23,5);
     puts("_____________________________________");
     gotoxy(12,7);
     textcolor(WH99vE);
     cputs(info1);
     textcolor(GREEN);
     gotoxy(1,11);
     cputs(info2);
     gotoxy(1,12);
     cputs(info3);
     gotoxy(1,13);
     cputs(info4);
     gotoxy(1,14);
     cputs(info5);
     gotoxy(1,18);
     cputs(info6);
     gotoxy(1,19);
     cputs(info7);
     getch();
     window(r.winleft,r.wintop,r.winright,r.winbottom);
     puttext(col,row,col+71,row+9,block);
    }

 

相关内容
赞助商链接