Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / application properties

Author
Message
old man
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location:
Posted: 15th Jan 2009 09:49
Hi everyone

I have made a game and can see the executable when I browse the folder, but it does not have any detail properties such as file description, Product name etc.

How do you set these properties in a VC++ GDK project?

uff
Orac
18
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 15th Jan 2009 10:18
You need to do it via a resource. See my earlier post about using compiled-in resources. Although VC++ Express does not have a built in resource editor, it does come with the resource compiler. You just need to create the resource.rc script as a text file manually and add it to your project. Have a Google for VS_VERSION_INFO or take a look at this link:

http://support.microsoft.com/kb/237870

There are only 10 types of people in the world.
Those who understand binary, and those who don't.
old man
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location:
Posted: 15th Jan 2009 12:52
Thanks Orac

Say the project is called sample
I have created a sample.rc file and put it in the debug folder.

In solution explorer on solution I right clicked, selected add existing item, and selected sample.rc

When I build the project I still do not see the new properies, where did I go wrong please??

uff
Orac
18
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 15th Jan 2009 14:39
I think sample.rc needs to be in the same folder as your source files. That way the resource compiler sees it and can include it in the link stage. If it is working correctly you should see a message in the output folder something along the lines of this ..



Of all the things I've lost .. I miss my marbles most of all.
old man
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location:
Posted: 15th Jan 2009 15:23
Thanks Orac

It does not appear to matter if I put it in either folder.

It is clear that the compiler is doing at least some of the job because it is creating a .res file that includes my new text but that does not appear in the exe details.

You mention the output folder. I can see and look at the output tab but that is transient in that as soon as I exit the exe then the only info is the unloading info. Is the build information held in another place?

If people are really selling VC++ express GDK software then are they not doing this bit?

uff
Orac
18
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 15th Jan 2009 16:11
Are you doing a build/run (F5)? If you just do a build only the information in the output folder should remain so that you can examine it for any linker warnings etc.

Quote: "If people are really selling VC++ express GDK software then are they not doing this bit?"


Probably not because it is a bit of a muck about.

Of all the things I've lost .. I miss my marbles most of all.
old man
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location:
Posted: 15th Jan 2009 18:28
Thanks Orac

I was doing build/run. If I do build I do not see a detailed listing of compile activity, just


Compiling...
mainobj.cpp
Linking...
Embedding manifest...
Build log was saved at

If I look at the build log I do not see any compilation details.

uff
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 15th Jan 2009 22:43
Don't you need a header? Like, resource.h. Then include it in mainobj.cpp, or whatever.
Orac
18
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 16th Jan 2009 09:36 Edited at: 16th Jan 2009 09:38
There does appear to be a slight problem with using the version info resource, it may be just the Express version but if you change the first line of the version structure in your .rc file as shown below



then it does work and when you right-click on the resulting .exe file you get the version tab.

As for retrieving the info for use by your program, well that's another article in itself!

If you are still having problems, I could zip up an example solution for you to download and look at.

@Zuka - yes, generally you would have a header so you could access your resources within your main program.

Of all the things I've lost .. I miss my marbles most of all.
old man
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location:
Posted: 16th Jan 2009 12:55
Thanks for that, I am looking for a user to be able to see all of the properies, for example copyright.

I am thinking that I am just being a cheapskate and should shell out for an upgrade to VC++, (I have an old c++), and so the time spent playing about trying to use the free version would probably be better spent learning VC++ and GDK.

Thanks for all your time!

uff
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 16th Jan 2009 19:25
Quote: "Thanks for that, I am looking for a user to be able to see all of the properies, for example copyright."

The VERSIONINFO resource allows you to specify copyright.

Orac
18
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 19th Jan 2009 15:06
I've attached a zip file containing a small project which demonstrates using the version info library. Don't give up on Express yet! It is a very capable compiler and IDE. The full version has a lot of extras including a resource editor, but if that is all you are after then it is a lot of cash. You could buy a stand-alone resource editor much cheaper and associate it with .rc files so it would open when you double clicked on it in the solution explorer, or just do as I have and create the file manually, at the end of the day that's what the resource editor does.

Of all the things I've lost .. I miss my marbles most of all.

Attachments

Login to view attachments
old man
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location:
Posted: 19th Jan 2009 16:57
Thanks Orac

Well I will have to give it a try now that you have taken the trouble to send this!

I am going to try to sort out some other bits that I have a problem understanding first though.

uff

Login to post a reply

Server time is: 2024-11-18 10:03:02
Your offset time is: 2024-11-18 10:03:02