seem the MAINICON is 101. but how are the other const? what is for description, version and others?
Printable View
seem the MAINICON is 101. but how are the other const? what is for description, version and others?
Here is your main reference for resource scripting: http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
"MAINICON" isn't part of the resource scripting language. However, it could be #define'd and used as a numeric identifier.
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
It is common to have a "resource.h" that contains #define's for all resource identifiers needed by both C/C++ code and the resource script.
You may also find resource generation apps useful as well:
http://www.resedit.net/
gg
the 101 is a const or 1 ID that we want?
>> so version is like:
The manual will tell you all about it - http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
>> how put description and company?
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
>> about MAINICON, i want to know that values
Give it whatever value you want - it doesn't matter.
I recommend using tools to generate your resource scripts.Code:#define MAINICON 123
gg
thanks about your recommendation, but in case, i can't use another programs. because my own IDE will create them;)
i'm confuse with anotherthing: when i put a wav file in RC file, how can i use it in source file?
is in these way:
resource.h:
#define WAVE 1
resource.rc
WAVE WAV "filename.wav"
main.cpp
#inclued <resource.h>
is only these? and now i can use the WAVE in PlaySound() function?
(i'm asking about the connection bettween rc file and cpp file)
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
As you can see, there is no "WAV" resource definition statement. So it's treated as a "user-defined" resource: http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
>> ... use the WAVE in PlaySound() function?
That API does support resources: http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
>> connection bettween rc file and cpp file
Here are the API's for dealing with resources in your code:
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
gg
thanks for all.
i readed these page: http://www.winprog.org/tutorial/resources.html
and now i understand the resource is a 'folder' inside of exe for we use dependents files, instead use a external folder for images\sound\others(you can correct me;))
but let me ask 1 thing: the nameID can be, realy, any number? if so why use 101 instead 1 or 0(zero)(for example)?
I believe that when Explorer displays an icon for an EXE, it searches the icon resources in the EXE and uses the one with the lowest Id.
"101" may just be some default value used by IDE's or other apps for authoring resource scripts. I believe the VisualStudio IDE defaults to 101 as the initial resource Id.
>> the nameID can be, realy, any number?
For ICON, the manual says:
Not sure if zero is valid.Quote:
Originally Posted by MSDN
gg
thanks for all. thanks.
thanks. i learned very, today, about resources. and i see the MAKEINTRESOURCE() function is for give me the resource item. very cool.
heres a nice link for learn a little more about resources files: http://www.winprog.org/tutorial/resources.html
thanks for all my friend