bit graphics in DevC++

Jun 2, 2022 at 7:23pm
I have many large programs written in DevC++ using Borland graphics. With Windows 10 they do not always run, and I cannot recompile as the BGI is no longer functional. I am not ready to move to a different program language or different version of C++. That would require extensive re-write of all these programs even for a minor update. If someone can give me a method to place one bit in one location with one color, I can re-create the few graphics functions I do use like “line” and “circle”. Then I should be able to compile with no problems.

Jun 3, 2022 at 6:55am
What version of BGI comes with Dev C++ ?
On github there are different versions called WinBGI, maybe you can try one of these.

Have you tried to run your programs in compatibility mode for Windows 7 ?
Last edited on Jun 3, 2022 at 6:56am
Jun 3, 2022 at 8:31pm
BGI does not come with DevC++. It came separate, but worked well with it. The problem is there are many users of my programs out there and It would be nice if I could make them work with Windows 10. I will try the WinBGI to see if it works.
Jun 3, 2022 at 9:31pm
Back in March (http://www.cplusplus.com/forum/windows/282597/#msg1223345) I mentioned WinBGI, the Windows port of BGI, working with Visual Studio and how it wasn't all that hard to get it to work with DevC++.
https://home.cs.colorado.edu/~main/bgi/visual/
https://home.cs.colorado.edu/~main/bgi/dev-c++/

As I mentioned at the 1st link above creating 32-bit executables with Dev-C++ on Win10 has problems. VS doesn't. BGI/WinBGI is 32-bit only.

I know the WinBGI files do work with Visual Studio 2022 and Win 10. If you upgrade your comipiler/IDE to Visual Studio won't matter to your end-users, except the executable will be more stable on Windows since it is a WinAPI app instead of DOS. It should still work as they expect.
Last edited on Jun 4, 2022 at 1:50am
Jun 4, 2022 at 3:29am
You could investigate Windows GDI.
If you ignore most of its functionality, it still does provide a simple way to put pixels on the screen.

See, for example, the fairly sloppy program at
https://cplusplus.com/forum/beginner/283720/#msg1228501
Topic archived. No new replies allowed.