News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

a question about application resource

Started by EricKane, May 04, 2006, 11:24:10 AM

Previous topic - Next topic

EricKane

I want add in a .ico resouce for console application,has somebody can tell me how to do this?
or give me some information about syntax of .rc format files.

tiwag

i assume, you want that your executable binary is shown with an icon in the windoze explorer

then it works with console projects the same way as with GUI projects, just edit a .rc file

for example: myconprj

myconprj.rc
aaaaaaaa ICON "myconprj.ico"


then add this file to your project.

when you are building your project, the resource compiler is atomatically invoked and creates a myconprj.res file,
which will be linked to your myconprj.exe file.

i used aaaaaaaa as iconname, because the icons are sorted alphabetically internally in the res file,
and if you use other icons too, this one will stay as the first icon which is found in the exe file and
this first one will be used to be displayed in the windoze explorer.

EricKane

Thanks!
and I want to learn more about this,can you recommend some books for me?

Guest

Try using a free Resource Editor like ResEd from http://www.radasm.com/projects/projects.html. Then look at the generated .rc files and you will learn enough. If you want a reference, you should go to the MSDN and download the Platform SDK or use it online. You can find the Resource-Definition Statements here.

EricKane