cbgiturbo-c

Adding blink to the color but its not blinking


The text should blink in red color but its not blinking

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main(void)
{
    int driver=DETECT,mode,mx,my,x1,y1,x2,y2;
    initgraph(&driver,&mode,"C:\\tc\\bgi");
    cleardevice();
    mx=getmaxx();
    my=getmaxy();
settextstyle(0,HORIZ_DIR,6);
setcolor(RED+BLINK);
outtextxy(mx/2,my/2,"FAHAD");
    getch();
    closegraph();





}

Solution

  • That code is targeted at 16-bit MS-DOS, the Win32 DOS-box virtualisation does not support the blinking attribute. I believe that it was supported in 'full-screen' mode, but versions of Windows since XP and 2000 do not support full-screen console or DOS-box presentation.