Having build several Visual COBOL executables I want to deploy them onto peoples desktops.
Rather than have a bog standard 'window' icon on my desktop I'd like to have them as small icons we've got artwork & images for.
How do I build the executable so that these 'images' can be seen as the desktop icon rather than the 'window' icon?
The icon that Windows displays for a program file is actually the first icon resource in its EXE file. If the EXE file has no icon resources, a standard icon is displayed. To link such icon resources into the EXE you have to have a resource file that contains your icon, you can link it into the produced executables.
In the case your resource file is a precompiled resource file (*.res) you can link it into the executable by specifying it as a additional link file. To do so right click on your project and choose Properties and in the opened dialog choose Micro Focus -> Build Configurations -> Link -> Additional Link Files. If the *.res file is inside your project you can add to the list by choosing "Add Files..." button. Otherwise you can use "Add External Files..." button to browse your local file system for the resource file.
In the case your resource file is a resource script (*.rc), you can add it to the project together with the icon file. Then you can invoke Microsoft resource compiler (rc.exe - part of Windows SDK) in the pre-build event script. You can add a pre-build event by right clicking on your project , then Properties and then Micro Focus -> Build Configurations -> Events. The pre-build script you have to add is something similar - rc.exe resourcefilename.rc. Then you can add the compiled resource file as Additional Link File so to have your icon built into the executable.
I hope the suggestions above will help you having a custom icon built into the EXE.
Just to add that my suggestions are for Visual COBOL for Eclipse.
I found a tool called IRFANVIEW which took our images and converted them to .ICO files.
I then refered to these files in the Icon & Manifest option.