DOSWIN.CPP
上传用户:wszmarenbt
上传日期:2013-04-26
资源大小:2552k
文件大小:1k
源码类别:

Windows编程

开发平台:

Visual C++

  1. #include<graphics.h>
  2. #include<conio.h>
  3. void DRAW_WIN(int X,int Y,int W,int H,int FORWARD,int BACKWARD);
  4. void main()
  5. {
  6. int driver=DETECT,mode;
  7. int XX=50,YY=30,WIDE=500,HIGHT=400;
  8. registerbgidriver(EGAVGA_driver);
  9. initgraph(&driver,&mode,"");
  10. DRAW_WIN(XX,YY,WIDE,HIGHT,BLUE,LIGHTGRAY);
  11. setcolor(YELLOW);
  12. outtextxy(XX+120,YY+150,"Welcome to this system!");
  13. setcolor(11);
  14. outtextxy(XX+120,YY+170,"Press any key to EXIT... ...");
  15. getch();
  16. DRAW_WIN(XX+80,YY+80,WIDE-200,HIGHT-300,RED,LIGHTGRAY);
  17. outtextxy(XX+100,YY+120,"Thank you for using this system!");
  18. getch();
  19. closegraph();
  20. }
  21. void DRAW_WIN(int X,int Y,int W,int H,int FORWARD,int BACKWARD)
  22. {
  23. setfillstyle(1,BACKWARD);
  24. bar(X+10,Y+10,X+W+10,Y+H+10);
  25. setfillstyle(1,FORWARD);
  26. bar(X,Y,X+W,Y+H);
  27. }