-
August 30th, 2013, 11:17 AM
#1
[RESOLVED] about resource files
seem the MAINICON is 101. but how are the other const? what is for description, version and others?
-
August 30th, 2013, 12:30 PM
#2
Re: about resource files
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
-
August 30th, 2013, 12:36 PM
#3
Re: about resource files
Originally Posted by Codeplug
so version is like:
VERSION 1.0.0
until here fine: but like you said about MAINICON, i want to know that values
how put description and company?
-
August 30th, 2013, 01:11 PM
#4
Re: about resource files
the 101 is a const or 1 ID that we want?
-
August 30th, 2013, 04:13 PM
#5
Re: about resource files
>> 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.
Code:
#define MAINICON 123
I recommend using tools to generate your resource scripts.
gg
-
August 31st, 2013, 03:36 AM
#6
Re: about resource files
Originally Posted by Codeplug
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)
-
August 31st, 2013, 01:14 PM
#7
Re: about resource files
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
-
August 31st, 2013, 01:24 PM
#8
Re: about resource files
Originally Posted by Codeplug
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)?
-
August 31st, 2013, 03:08 PM
#9
Re: about resource files
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:
Originally Posted by MSDN
nameID - Unique name or a 16-bit unsigned integer value identifying the resource.
Not sure if zero is valid.
gg
-
August 31st, 2013, 03:33 PM
#10
Re: about resource files
Originally Posted by Codeplug
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.
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|