I think you are speaking about the GUI method. When compiling using the GUI, the icon is there. I'm trying to compile the program via the command-line. I've been able to get the program to work, however I can't get the icon to show up. Any ideas? Thanks in advance, Panarchy
I got it to work by using the .res at the linking stage. So I've now successfully worked out how to compile, the program via command-prompt, specifying the name, and having the correct icon. Thanks for all your help. Now, any ideas on how I can do this within my C++ code? Thanks in advance, Panarchy
Great stuff! What were the final commands you used? Assuming you mean how can you get an icon using pure C++ code without any resources: You can't. Resources can be made programmatically and there is support in the WinAPI for that, but the way Windows draws an icon is by looking in the executable for icon resources. If you want to animate an icon like the way AVG modifies its tray icon, or the way Privoxy does the radar thing when loading a page, etc, then you do that with multiple icon resources and specify at runtime which resource is the current system tray icon or whatever.
So... any idea how I can specify the name within the C++ code? Thanks in advance for any help, Panarchy
Hello Again! I still haven't worked out how to do this . Could someone please tell me how to set the name of the *.exe programmatically? More info: http://msdn.microsoft.com/en-us/lib....vcprojectengine.vclinkertool.outputfile.aspx Please help me do this! Thanks in advance, Panarchy
Could you give a detailed description of the problem you're trying to solve? In particular I'd like to understand why the approach I suggested before won't work, i.e. specifying the name of the executable at the command line and scripting the generation of the executables. i.e. Code: cl prog.c -Dprog1_options -o prog1.exe cl prog.c -Dprog2_options -o prog2.exe cl prog.c -Dprog3_options -o prog3.exe and in the code Code: #ifdef prog1_options // do the prog1 stuff #endif #ifdef prog2_options // do the prog2 stuff #endif // etc
The page reference leads to documentation on Customizing and Automating the Development Environment and for help with this I would recommend using the appropriate Microsoft newsgroups, you're more likely to find someone who will help you with this over there.
Are you talking about your scripted example? No, thanks, but I'd prefer to do this within the code... or even, thinking outside the square, to edit the script from within my C++ code and also have it run after code is compiled... Would that be possible?