| |

VerySource

 Forgot password?
 Register
Search
View: 884|Reply: 6

C language, using svga256.bgi to achieve 256 color display, how to change the background color? ? ? Anxious! !!

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-2-23 15:30:01
| Show all posts |Read mode
The setbkcolor () function does not work, the background is always black.
Reply

Use magic Report

0

Threads

78

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-5-8 14:45:01
| Show all posts
Fill the entire window with a certain color .......
Reply

Use magic Report

0

Threads

78

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-5-9 12:45:01
| Show all posts
have a test:

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

int main ()
{
int gdriver, gmode, i;
gdriver = DETECT;
initgraph (&gdriver,&gmode, ""); / * Graph initialization * /
setbkcolor (2); / * Set the graphics background * /
getch ();
cleardevice ();
getch ();
for (i = 0; i <= 15; i ++)
{
setcolor (i); / * Set different drawing colors * /
circle (320, 240, 20 + i * 10); / * Draw circles with different radii * /
delay (100); / * Delay 100 ms * /
}
for (i = 0; i <= 15; i ++)
{
setbkcolor (i); / * Set different background colors * /
cleardevice ();
circle (320, 240, 20 + i * 10);
delay (100);
}
getch ();
closegraph ();
return 0;
}
Reply

Use magic Report

0

Threads

78

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-5-9 15:00:01
| Show all posts
If setbkcolor is valid,
Then check your program ~~
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-6-6 12:15:01
| Show all posts
For 16-color display, this function is valid. Use svga256.bgi to achieve 256-color display. The function is invalid. The return value of getplatette() is 1? ? ? ?
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-6-13 10:30:01
| Show all posts
This program is too long to be modified.
Reply

Use magic Report

1

Threads

14

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 United States

Post time: 2020-7-9 10:45:01
| Show all posts
See the program
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list