To have an executable file that seems professional, it's necessary to have your own icon when someone launches your program.
This tutorial could easily adapted to any application generated from Visual Studio on Windows.
This icon is generally the logo of the software, game or application you created.
The icon for the program must be an ICO format.
It means that the extension must be .ico, like for example icon.ico.
The name is free, but the extension is not.
This extension has to be a real ICO format and for that you have to generate this ICO file from a PNG.
There are a lot of website that allow you to convert a PNG file into an ICO.
Just search on your favorite search engine with this kind of research: png to ico.
To follow this tutorial, let's create a project from scratch or skip this part if you already created one with a previous OpenGL tutorial.
Open Visual Studio and create an empty project > File > New > Project > Templates > Visual C++ > Empty Project.
OK > Finish.
Your Shapes2D project has been created into your BadprogTutorial solution.
Let's add a main.cpp > Right click your project > Add > New Item > Visual C++ > C++ File > write the name main.cpp > Add.
From Visual Studio, open your project and right click Resource Files > Add > New Item > type a new name like badprog.rc > Add.
Now the file badprog.rc is in the virtual Resource Files directory.
You could find this file on your project directory:
Add the icon.ico file inside this directory:
You can't directly open this file, so still from your Solution > Right click badprog.rc > View Code.
As you can see the file is empty.
Then write inside:
Now build and launch your project.
Once done, you should see in the Debug directory, the Shapes2D.exe file with the icon that you've just added.
So at the end you should have the following arborescence from your project on Windows:
And from Visual Studio:
Once you've compiled your project, you should have, in your Debug directory, the final Shape2D.exe with your own icon.
You know now how to create your own icon for your executable file for your OpenGL program.
But not only because as said previously this tutorial works for every program you'll create with Visual Studio.
So, well done you've made it.