Adding an Icon, Release Mode

Once you're done with a program and want to publish it, there are a few final steps you need to do.

Change to Release Mode

By default, Visual Studio compiles your program in Debug mode.  This is good for finding problems in your program, but once it is all working, you can tell the compiler to change to Release mode.  This will allow the program to run faster, and it also makes a smaller executable file.

In Visual Studio, do Build... Configuration Manager, and change "Active Solution Configuration" to Release. Close. Recompile.

Make the WinBGI go faster

If you want to get your program to go even faster, you can change line 42 of winbgi2.cpp, Change

int bgiemu_handle_redraw = TRUE;

to

int bgiemu_handle_redraw = FALSE;

The disadvantage of this is that when you minimize your window then open it up again, everything disappears... which won't be a problem if you're constantly redrawing everything.

Since your program will now go slightly faster, you might want to adjust some of the delay( ) statements.

Adding an Icon.

Finally, to add a little personality to your program, you can change the icon of the executable.

From the menu, do Project... Add Resource, and choose Icon, then click New:

Draw whatever you want in the design view.  Use the tabs near the top of the screen to go back to your source code.  Next time you compile, it will add your new icon to the executable.