• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setbkcolor函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setbkcolor函数的典型用法代码示例。如果您正苦于以下问题:C++ setbkcolor函数的具体用法?C++ setbkcolor怎么用?C++ setbkcolor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setbkcolor函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: submenu

void submenu()
{ int i;
//////pintar menu
	       setbkcolor(WHITE);
settextstyle(2,0,0);
box(0,0,getmaxx(),getmaxy(),1,0);
//for (i=1;i<1000;i=i+1)putpixel(rand()%640,rand()%480,RED);
	box(10,0,110,40,1,7);
	outtextxy(20,10,"Batallas");

	box(120,0,230,40,1,7);
	outtextxy(130,10,"Trofeos");

	box(240,0,350,40,1,7);
	outtextxy(250,10,"Guardar");

	box(530,0,600,40,1,7);
	outtextxy(540,10,"Salir");
//////////////
	box(10,40,110,60,1,7);
	outtextxy(40,45,"Batalla 1");

	box(10,60,110,80,1,7);
	outtextxy(40,65,"Batalla 2");

	box(10,80,110,100,1,7);
	outtextxy(40,85,"Batalla 3");

	box(10,100,110,120,1,7);
	outtextxy(40,105,"Batalla 4");

	box(10,120,110,140,1,7);
	outtextxy(40,125,"Batalla 5");
}
开发者ID:ManuelAlanis,项目名称:BatallaNaval-C,代码行数:34,代码来源:1.CPP


示例2: intro

void intro()
{   int i,j;
    clrscr();
    cleardevice();
    setbkcolor(BLACK);
    gotoxy (25,12);
    settextstyle(4,0,6);
    for(i=0; i<=10; i++)
    {
        setcolor(i%16);
        outtextxy(2,2,"SHUFFLE GAME");
        settextstyle(1,0,7);
        outtextxy(20,200,"");
        delay(100);
        outtextxy(180,200,"1");
        delay(100);
        outtextxy(220,200,"2");
        delay(100);
        outtextxy(260,200,"3");
        delay(100);
        outtextxy(180,300,"4");
        delay(100);
        outtextxy(220,300,"5");
        delay(100);
        outtextxy(260,300,"6");
        delay(100);
        outtextxy(180,400,"7");
        delay(100);
        outtextxy(220,400,"8");
        settextstyle(4,0,8);
        delay(100);
        getch();
    }
}
开发者ID:noczero,项目名称:PASCAL,代码行数:34,代码来源:Shuffle+Game+project+.CPP


示例3: uno

		void uno()
		{
		clearviewport();
		setbkcolor(0);
		fillellipse(320,240,100,50);
		getch();
		}
开发者ID:ManuelAlanis,项目名称:BatallaNaval-C,代码行数:7,代码来源:1.CPP


示例4: popup

void popup()
{
    int x1,x2,y1,y2, i,
        nRec = 13; // Numero de rectangulos
    x1 = x2 = (WIDTH/2);
    y1 = y2 = (HEIGHT/2);

    setfillstyle(1,0x00CCFF);
    for(i=0; i<nRec; x1-=15, y1-=10, x2+=15, y2+=10, i++)
    {
        bar(x1, y1, x2, y2);
        delay(15);
    }

    // ¡PERDISTE!
    setbkcolor(0x00CCFF);
    setcolor(0x0054D3);
    settextstyle(3, HORIZ_DIR, 6);
    outtextxy(WIDTH/2-textwidth("¡PERDISTE!")/2, y1+textheight("P")/2, "¡PERDISTE!");

    setcolor(0x4b78F2);
    settextstyle(3, HORIZ_DIR, 3);
    outtextxy(WIDTH/2-textwidth("Presiona cualquier tecla")/2, y1+textheight("P")*4, "Presiona cualquier tecla");

    settextstyle(3, HORIZ_DIR, 3);
    outtextxy(WIDTH/2-textwidth("para continuar")/2, y1+textheight("P")*5, "para continuar");
}
开发者ID:Betobit,项目名称:Run-dino-run,代码行数:27,代码来源:main.cpp


示例5: end

void end()
{
	int i,j,k;
	int gd=DETECT,gm;

	initgraph(&gd,&gm,"c:\\tc\\bgi");

	setbkcolor(BROWN);
	setcolor(RED);
	settextstyle(1,0,8);

	outtextxy(130,50,"_-~Search~-_");
	setcolor(RED);
	settextstyle(1,0,8);
	outtextxy(10,190,"_-~For me~-_");
	settextstyle(7,0,3);
	setcolor(RED);
	setcolor(10+BLINK);
	outtextxy(300,300,"THANK YOU");
	setcolor(10);
	outtextxy(300,355,"Have a nice day.....");
	setcolor(4);

	for(k=0;k<640;k++)
	{
	    if(k==635)
		{
		     for(j=0;j<480;j++)
			  {
			      circle(635,j,4);
			      delay(1);
			  }
		}
	    else
		{
		     circle(k,5,5);
		     delay(1);
		}
	}

	for(k=639;k>(-1);k--)
	     {
		  if(k==0)
		      {
			   for(j=475;j>0;j--)
				{
				    circle(5,j,5);
				    delay(1);
				 }
	     }
	 else
	      {
		   circle(k,475,4);
		   delay(1);
	      }
	}

	restorecrtmode();
}
开发者ID:shivam5992,项目名称:Dynamic_Dictionary,代码行数:59,代码来源:Dictionary.C


示例6: main

void main()
{
  int ch;
  clrscr();
  while(1)
  {
   initgraph(&gdriver, &gmode, "");
   errorcode = graphresult();
   if (errorcode != grOk)
    {
      printf("%d",errorcode);
      printf("Graphics error: %s\n", grapherrormsg(errorcode));
      printf("Press any key to halt:");
      getch();
      exit(1);
    }
   cleardevice();
   setbkcolor(6);
   setcolor(15);
   settextstyle(1,0,1);
   sprintf(msg,"SRI JAYACHAMARAJENDRA COLLEGE OF ENGINEERING");
   outtextxy(75,10,msg);
   sprintf(msg,"MYSORE-570006");
   outtextxy(230,40,msg);
   sprintf(msg,"STUDENT DATABASE");
   outtextxy(220,100,msg);
   sprintf(msg,"1. INSERT A RECORD");
   outtextxy(200,200,msg);
   sprintf(msg,"2. ACCESS A RECORD");
   outtextxy(200,240,msg);
   sprintf(msg,"3. DELETE A RECORD");
   outtextxy(200,280,msg);
   sprintf(msg,"4. DISPLAY THE DATABASE");
   outtextxy(200,320,msg);
   sprintf(msg,"5. EXIT");
   outtextxy(200,360,msg);
   sprintf(msg," Please enter your choice:");
   outtextxy(220,400,msg);
   printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
   printf("\n\t\t\t\t\t");
   scanf("%d",&ch);
   clrscr();
   switch(ch)
      {
	      case 1:write();
		     break;
	      case 2:read();
		     break;
	      case 3:del();
		     break;
	      case 4:display();
		     break;
	      case 5:exit(0);
	      default:printf("Wrong Choice:Please enter a valid choice");
      }
      getch();
      closegraph();
    }
}
开发者ID:adarsh1990,项目名称:INFORMATION-SYSTEM-USING-BIT-STRINGS-,代码行数:59,代码来源:HAPPY.C


示例7: guardar

void guardar()
{
inicializa();
setbkcolor(7);
settextstyle(3,0,4);
outtextxy(100,50,"Escriba nombre para la partida");
capturacadena(100,100);
}
开发者ID:ManuelAlanis,项目名称:BatallaNaval-C,代码行数:8,代码来源:1.CPP


示例8: resetWindow

void resetWindow()
{
	//Sets background color to GREEN
	setbkcolor (GREEN);
	//Sets drawing color to WHITE
	setcolor(WHITE);
	clearviewport();
}
开发者ID:CodePond,项目名称:Bore-Hole-Manager,代码行数:8,代码来源:graphic_window.c


示例9: setbkcolor

void Ventana::Error(char *p) {
	setbkcolor(YELLOW);
	setcolor (BLACK);
	outtextxy(0,0,p);
	getch();
	closegraph();
	exit (1);
}
开发者ID:agudeloandres,项目名称:C_Struct_Files,代码行数:8,代码来源:P566.CPP


示例10: main

void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"NULL");
setbkcolor(BLUE);
outtextxy(200,200,"COMPUTER GRAPHICS");
getch();
closegraph();
}
开发者ID:DevinderKaur,项目名称:2D-graphics,代码行数:9,代码来源:5.c


示例11: canvas_begin_draw

void canvas_begin_draw( void ) {
	drawing = true;
	setactivepage( canvas_inactive_page() );

	cleardevice();
	setbkcolor(WHITE);

	return;
}
开发者ID:nashr,项目名称:Paint-Rohmen,代码行数:9,代码来源:canvas.c


示例12: main

int main(){
	initgraph(500,600);
	setbkcolor(EGERGB(0x0, 0x40, 0x0));
	setcolor(1);
	rectangle(100,100,300,500);
	getch();
	closegraph();
	return 0;
}
开发者ID:sunnybearmiah,项目名称:base-c--practice,代码行数:9,代码来源:58-ex.c


示例13: first

void first()
{
	int i,j,k;
	int gd=DETECT,gm;
	initgraph(&gd,&gm,"c:\\tc\\bgi");

	setbkcolor(BROWN);
	setcolor(RED);
	settextstyle(1,0,8);
	outtextxy(130,50,"_-~Search~-_");
	setcolor(RED);
	settextstyle(1,0,8);
	outtextxy(10,190,"_-~For Me~-_");
	settextstyle(7,0,3);
	setcolor(RED);
	setcolor(10);
	
	setcolor(4);

	for(k=0;k<640;k++)
	{
	    if(k==635)
		{
		     for(j=0;j<480;j++)
			  {
			      circle(635,j,4);
			      delay(1);
			  }
		}
	    else
		{
		     circle(k,5,5);
		     delay(1);
		}
	}

	for(k=639;k>(-1);k--)
	     {
		  if(k==0)
		      {
			   for(j=475;j>0;j--)
				{
				    circle(5,j,5);
				    delay(1);
				 }
	     }
	 else
	      {
		   circle(k,475,4);
		   delay(1);
	      }
	}

	getch();
	restorecrtmode();
}
开发者ID:shivam5992,项目名称:Dynamic_Dictionary,代码行数:56,代码来源:Dictionary.C


示例14: tienda

void tienda()
{
    int i, xi, pag = 1,
        huesos,
        pos = 0; // Posicion del indicador.
    char tecla;
    String aux;

    obtenerDatos(&huesos, &i);
    setvisualpage(pag);
    while(tecla!=27)
    {
        setactivepage(pag=!pag);
        setfillstyle(1, COLOR(79, 182, 225));
        bar(0,0, WIDTH, HEIGHT);
        dibujaHuesos(huesos);
        setfillstyle(1, 0x00f);
        for(i=0, xi=WIDTH/3; i<NSKINS; i++, xi+=PIXEL_TAM*25)
            if(pos==i)
                bar(xi, 450+PIXEL_TAM*25, xi+PIXEL_TAM*20, 460+PIXEL_TAM*25);

        if(kbhit())
            switch(tecla = getch())
            {
                case 13:
                    compra(pos+1);
                    obtenerDatos(&huesos, &i);
                    break;
                case 77:
                    if(pos!=2)
                        pos++;
                    break;
                case 75:
                    if(pos!=0)
                        pos--;
                    break;
            }

        setbkcolor(0x0066F4);
        setfillstyle(1, 0x0066F4);
        setcolor(0x003988);
        settextstyle(2, HORIZ_DIR, 8);
        for(i=0, xi=WIDTH/3; i<NSKINS; i++, xi+=PIXEL_TAM*25)
        {
            sprintf(aux, "dino%d.%d.txt", i+1,pag);
            dibujaSprite(aux, xi, 450);
            sprintf(aux, "$ %d", 300*i);
            if(i)
                outtextxy(xi, 460+PIXEL_TAM*25, aux);
        }
        setvisualpage(pag);
        delay(80);
    }

    iniciaEntorno();
}
开发者ID:Betobit,项目名称:Run-dino-run,代码行数:56,代码来源:main.cpp


示例15: init

     void init(int color)
     {
      int drive,mode;
      drive=DETECT;
      registerbgidriver(EGAVGA_driver);
      initgraph(&drive,&mode,"");
      setbkcolor(color);


    }
开发者ID:Quanhua-Guan,项目名称:cgame,代码行数:10,代码来源:migong.c


示例16: main

void main()
{   int gdriver = DETECT, gmode, errorcode;
    initgraph(&gdriver, &gmode, "c:\\turboc3\\bgi");
    intro();
    levelmenu();
    clrscr();
    cleardevice();
    setbkcolor(RED);
    easy();
}
开发者ID:noczero,项目名称:PASCAL,代码行数:10,代码来源:Shuffle+Game+project+.CPP


示例17: init

void init(int* gd, int* gm) {
  initgraph(gd, gm, "c:\\tc\\bgi");
  clrscr();
  max.x = getmaxx(); max.y = getmaxy();
  origin.x = max.x/2; origin.y = max.y/2;
  setbkcolor(BLUE); setcolor(CYAN);
  line(0,origin.y, max.x,origin.y);
  line(origin.x,0, origin.x,max.y);
  setcolor(RED);
}
开发者ID:avinashnsit,项目名称:College-Programs,代码行数:10,代码来源:HindiName.cpp


示例18: main

main()
{
	int driver = DETECT, mode;
	initgraph(&driver, &mode, "");
	setbkcolor(BLUE);
	setcolor(WHITE);
	move();
	getch();
	closegraph();
}
开发者ID:weimingtom,项目名称:old_books_code,代码行数:10,代码来源:P2-5.C


示例19: main

int main (int argc, char **argv)
{
  int gd, gm;
  int col;
  unsigned int seed;
  long int counter;
  float j, k, x, y, xx, xp, yp, r, xoffs, yoffs;
  
  if (argc == 2)
    seed = atoi (argv [1]); /* no checks! */
  else {  
    printf ("Seed: ");
    j = scanf ("%d", &seed);
  }
  srand (seed);
  // random each time:
  // srand (time(NULL));
  
  gd = X11;
  gm = getmaxmode ();
  initgraph(&gd, &gm, "");
  
  setbkcolor (BLACK);
  cleardevice ();
  setcolor (YELLOW);
  outtextxy (0, 0, "Press a key or click to exit: ");
  
  xoffs = getmaxx () / 2;
  yoffs = getmaxy () / 3;
  j = random (100);
  k = random (100);
  x = y = xx = xp = yp = r = 0.0;
  col = 1; /* colours codes run from 0 (black) to 15 (white) */
  counter = 0;
  setcolor (col);

  while (!kbhit () && !mouseclick ()) {
    xx = y - sgn (x) * sqrt (abs (k * x - 1));
    y = j - x;
    x = xx;
    xp = x * 2 + xoffs;
    yp = y * 2 + yoffs;
    _putpixel (xp, yp);
    if (++counter == 20000) {
      counter = 0;
      col++;
      if (col == 16)
	col = 1;
    }
    setcolor (col);
  }
   
  closegraph ();
  return 0;
}
开发者ID:romanz,项目名称:crystal-maze-3d,代码行数:55,代码来源:hopalong.c


示例20: bullet

void bullet(int i)
{
	setbkcolor(0);
	int j;
	for(j=425;j>=0;j-=25)
	{circle(325+i,j,3); floodfill(327+i,j+1,RED);
	if((322+i<=::x)&&(328+i>=::x)&&(j==::y))
	  {::l++;if(::l<20){blast(i,j);break;}
	   if(::l==20){getch();delay(1000);blast(i,j);score(i,::l,::shots);}}
	delay(15); sound(600);delay(1);nosound(); target(i);}
}
开发者ID:Tej1106083,项目名称:wow,代码行数:11,代码来源:WoW.cpp



注:本文中的setbkcolor函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setbuf函数代码示例发布时间:2022-05-30
下一篇:
C++ setbits_le32函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap