The WinBGIm version you’ve downloaded is bugged.
Following the link you posted you can read:
The new version should be automatically installed (hopefully) together with Code::Blocks EDU-Portable, also known as CodeBlocks-EP:
http://codeblocks.codecutter.org/
(Note if you opt for the portable version, it should not conflict with you existent Code::Blocks installation.)
However, you could also try to follow this suggestion I’ve found on a forum:
a) open “graphics.h”
b) find line 302
int left=0, int right=0, int right=INT_MAX, int bottom=INT_MAX,
c) make it equal to line 311
int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX,
i.e. modify
int right=0
into
int top=0
save and... good luck!
Please note: I haven’t tried that.
Even if the above suggestion worked, your instruction
getch();
is likely to become your next issue: getch() belongs to "conio.h", another discontinued header.
It looks you’re messing with old and poorly portable stuff, doesn’t it? Is it worth it?