Setbkcolor function in c using graphics.h

  • برمجة سي c

Setbkcolor function in c using graphics.h

Declaration: void setbkcolor(int color);

setbkcolor function changes current background color e.g. setbkcolor(YELLLOW) changes the current background color to YELLOW.
Remember that default drawing color is WHITE and background color is BLACK

الأجوبة

#include<graphics.h>
#include<conio.h>

main()
{
   int gd = DETECT, gm;
   initgraph(&gd, &gm, "C:\\TC\\BGI");
   
   outtext("Press any key to change the background color to GREEN.");
   getch();
   
   setbkcolor(GREEN);
   
   getch();
   closegraph();
   return 0;
}
هل كان المحتوى مفيد؟

القوائم الدراسية التي ينتمي لها السؤال

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...