Thread: Re: [Dev-C++] Resource files
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel G. <sp...@ho...> - 2003-03-19 11:04:37
|
By what type of dialog box do you mean modal or modaless? RC files can be used to store strings, control IDs etc. and are useful if you plan on selling your product in multiple countries as all you do is change the RC file - the source code remains the same. >From: "Ioannis Vranos" <iv...@em...> >To: "Dev-C++ Mailing List" <dev...@li...> >Subject: [Dev-C++] Resource files >Date: Wed, 19 Mar 2003 12:46:16 +0200 > >Hi guys & girls, > >I would be happy if someone answered to me regarding this: What exactly are >resource files (binary or text) and what type of dialog boxes do they >describe in Win32 API world? > > > > > >Regards, > >Ioannis Vranos > >* Programming pages: http://www.noicys.freeurl.com >* Alternative URL: http://run.to/noicys > > > > >------------------------------------------------------- >This SF.net email is sponsored by: Does your code think in ink? >You could win a Tablet PC. Get a free Tablet PC hat just for playing. >What are you waiting for? >http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Surf together with new Shared Browsing http://join.msn.com/?page=features/browse&pgmarket=en-gb&XAPID=74&DI=1059 |
|
From: Daniel G. <sp...@ho...> - 2003-03-19 11:31:34
|
One purpose. The other is modularisation, keeping the pieces separate and portable. >From: "Ioannis Vranos" <iv...@em...> >To: <dev...@li...> >Subject: RE: [Dev-C++] Resource files >Date: Wed, 19 Mar 2003 13:08:34 +0200 > > > -----Original Message----- > > From: Daniel Glenfield [mailto:sp...@ho...] > > Sent: Wednesday, March 19, 2003 1:04 PM > > To: iv...@em...; dev...@li... > > Subject: Re: [Dev-C++] Resource files > > > > > > By what type of dialog box do you mean modal or modaless? > > > > RC files can be used to store strings, control IDs etc. and > > are useful if > > you plan on selling your product in multiple countries as all > > you do is > > change the RC file - the source code remains the same. > > >So their purpose is internationalization? > > > > >Ioannis Vranos > >* Programming pages: http://www.noicys.freeurl.com >* Alternative URL: http://run.to/noicys > > > > >------------------------------------------------------- >This SF.net email is sponsored by: Does your code think in ink? >You could win a Tablet PC. Get a free Tablet PC hat just for playing. >What are you waiting for? >http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ MSN Messenger - fast, easy and FREE! http://messenger.msn.co.uk |
|
From: Ioannis V. <iv...@em...> - 2003-03-19 12:25:27
|
Thank you all those who provided me with useful information about the resource files. My questions have been answered (and more). Regards, Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL: http://run.to/noicys |
|
From: Jaap de W. <wo...@Ne...> - 2003-03-19 14:01:03
|
res files are linked in the exe. They are optional, you can create exe's without resources. -----Original Message----- From: Louis Godio [mailto:lg...@ya...] Sent: Wednesday, March 19, 2003 1:36 PM To: Terry L Fritts; Dev-C++ Mailing List Subject: Re: [Dev-C++] Resource files On this same question, Are .res files optional or must they always be present in WIN32 API apps ? What is the advantage of having a menus etc. in the .res file and not in the .exe file? --- Terry L Fritts <tf...@sm...> wrote: > Hello Ioannis, > > Wednesday, March 19, 2003 you wrote: > IV> What exactly are resource files (binary or text) and what type of > IV> dialog boxes do they describe in Win32 API world? > > A resource file contains a collection of icons, menus, dialog boxes, > strings tables, and other stuff. > > For instance you might right click on an .exe file and be able to see > the author, version, name, company, etc. This typically would be in a > resource file. Likewise the icon associated with an .exe is there. > The menus in an application or often defined in a resource file. > > > Terry Fritts > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Does your code think in ink? > You could win a Tablet PC. Get a free Tablet PC hat just for playing. > What are you waiting for? > http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com ------------------------------------------------------- This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Ioannis V. <iv...@em...> - 2003-03-19 11:08:42
|
> -----Original Message----- > From: Daniel Glenfield [mailto:sp...@ho...] > Sent: Wednesday, March 19, 2003 1:04 PM > To: iv...@em...; dev...@li... > Subject: Re: [Dev-C++] Resource files > > > By what type of dialog box do you mean modal or modaless? > > RC files can be used to store strings, control IDs etc. and > are useful if > you plan on selling your product in multiple countries as all > you do is > change the RC file - the source code remains the same. So their purpose is internationalization? Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL: http://run.to/noicys |
|
From: Per W. <pw...@ia...> - 2003-03-19 11:55:47
|
Among other things yes. Every resource in the resource file - string, menu, image, ... have a language and sub-language setting, i.e. English,US-English. But the resource is also a way to use graphical design tools to describe the graphical API of an application. The resource file allows any data that the resource editor needs to change to be separated from the manually edited source code of the application. A resource file might contain the same string etc. in multiple languages. The OS will then try to auto-select the language based on the users language settings in the OS. One other reason for resource files is that the same code may support a simple or advanced API. In the simplified API, some dialogs might be smaller, and with some 'advanced' fields removed. A third reason for resource files is that they allow customization, i.e. a program is delivered to different corporations, and each corporation gets the application with different look-and-feel, i.e. the colors, logos etc. are adjusted. Basically, a resource compiler takes a - normally text - xx.rc file and produces a binary xx.res file. That file is then appended to the executable file, and the windows API contains functions to look for resource data at the end of a exe or dll file. One way to support multiple languages of an application is to build the main exe without resources - or with only language-neutral resources. Then the project contains one dll file for each market. Uppon startup, the program selects which dll to load and use for resource lookup. /Per W On Wed, 19 Mar 2003, Ioannis Vranos wrote: > > -----Original Message----- > > From: Daniel Glenfield [mailto:sp...@ho...] > > Sent: Wednesday, March 19, 2003 1:04 PM > > To: iv...@em...; dev...@li... > > Subject: Re: [Dev-C++] Resource files > > > > > > By what type of dialog box do you mean modal or modaless? > > > > RC files can be used to store strings, control IDs etc. and > > are useful if > > you plan on selling your product in multiple countries as all > > you do is > > change the RC file - the source code remains the same. > > > So their purpose is internationalization? > > > > > Ioannis Vranos > > * Programming pages: http://www.noicys.freeurl.com > * Alternative URL: http://run.to/noicys > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Does your code think in ink? > You could win a Tablet PC. Get a free Tablet PC hat just for playing. > What are you waiting for? > http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Zodiaq <zo...@ac...> - 2003-03-21 22:04:43
|
Hello Per and all Dev-C++ users, Wednesday, March 19, 2003, 1:54:34 PM, Per wrote as follows: PW> Among other things yes. Every resource in the resource file - string, PW> menu, image, ... have a language and sub-language setting, i.e. PW> English,US-English. PW> But the resource is also a way to use graphical design tools to describe PW> the graphical API of an application. The resource file allows any data Graphical API?? IMO there is no such thing... Do you mean GUI - Graphical User Interface ? PW> that the resource editor needs to change to be separated from the manually PW> edited source code of the application. PW> A resource file might contain the same string etc. in multiple languages. PW> The OS will then try to auto-select the language based on the users PW> language settings in the OS. AFAIK in source code programmer have to load proper local string, AFAIK system doesn't do that autamatically... am I wrong? PW> One other reason for resource files is that the same code may support a PW> simple or advanced API. In the simplified API, some dialogs might be PW> smaller, and with some 'advanced' fields removed. But if some fields are removed source code also have to be changed... if not program would crush trying to send some infos to not existing controls - I have experienced this recently... PW> A third reason for resource files is that they allow customization, i.e. a PW> program is delivered to different corporations, and each corporation gets PW> the application with different look-and-feel, i.e. the colors, logos etc. PW> are adjusted. Hmmm... interesting... got to remember that! PW> Basically, a resource compiler takes a - normally text - xx.rc file and PW> produces a binary xx.res file. That file is then appended to the MinGW produces .o files... but extension IS NOT important, only that it have to be linked into final executable... PW> executable file, and the windows API contains functions to look for PW> resource data at the end of a exe or dll file. PW> One way to support multiple languages of an application is to build the PW> main exe without resources - or with only language-neutral resources. Then PW> the project contains one dll file for each market. Uppon startup, the PW> program selects which dll to load and use for resource lookup. Good idea! PW> /Per W Thanks for your comments :-) -- regards, Zodiaq |
|
From: Per W. <pw...@ia...> - 2003-03-21 23:02:43
|
See below /PWM On Fri, 21 Mar 2003, Zodiaq wrote: > Hello Per and all Dev-C++ users, > > Wednesday, March 19, 2003, 1:54:34 PM, Per wrote as follows: > > PW> Among other things yes. Every resource in the resource file - string, > PW> menu, image, ... have a language and sub-language setting, i.e. > PW> English,US-English. > > PW> But the resource is also a way to use graphical design tools to describe > PW> the graphical API of an application. The resource file allows any data > > Graphical API?? IMO there is no such thing... Do you mean GUI - > Graphical User Interface ? Yes, that's what I mean. A resource editor is a bit more graphical than most GUI's :-) > > PW> that the resource editor needs to change to be separated from the manually > PW> edited source code of the application. > > PW> A resource file might contain the same string etc. in multiple languages. > PW> The OS will then try to auto-select the language based on the users > PW> language settings in the OS. > > AFAIK in source code programmer have to load proper local string, > AFAIK system doesn't do that autamatically... am I wrong? You are both right and wrong. The resource file may contain the same resource (string, dialog, image, ...) in multiple language versions. However, the order of the different languages in the file seems to affect the OS success at selecting correct language version. If the language order is correct for a Swedish Win NT, i.e. depending on user language the application always selects correct language of dialogs, a German NT will fail misserably. M$ have a tendancy to implement interesting ideas but then fuck up on the implementation. > > PW> One other reason for resource files is that the same code may support a > PW> simple or advanced API. In the simplified API, some dialogs might be > PW> smaller, and with some 'advanced' fields removed. > > But if some fields are removed source code also have to be changed... > if not program would crush trying to send some infos to not existing > controls - I have experienced this recently... It's a question of type of fields, and how the application is written. It's completely safe to send messages to controls that doesn't exist in the resource file. However, if the application binds the control to a C++ object, things might get a bit more hairy. It's also important for the program to either check for the existence of input fields, or to supply reasonable defaults in case the removed field is a input field. > > PW> A third reason for resource files is that they allow customization, i.e. a > PW> program is delivered to different corporations, and each corporation gets > PW> the application with different look-and-feel, i.e. the colors, logos etc. > PW> are adjusted. > > Hmmm... interesting... got to remember that! > > PW> Basically, a resource compiler takes a - normally text - xx.rc file and > PW> produces a binary xx.res file. That file is then appended to the > > MinGW produces .o files... but extension IS NOT important, only that > it have to be linked into final executable... > > PW> executable file, and the windows API contains functions to look for > PW> resource data at the end of a exe or dll file. > > PW> One way to support multiple languages of an application is to build the > PW> main exe without resources - or with only language-neutral resources. Then > PW> the project contains one dll file for each market. Uppon startup, the > PW> program selects which dll to load and use for resource lookup. > > Good idea! > > PW> /Per W > > Thanks for your comments :-) > -- > regards, Zodiaq > > > > ------------------------------------------------------- > This SF.net email is sponsored by:Crypto Challenge is now open! > Get cracking and register here for some mind boggling fun and > the chance of winning an Apple iPod: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: David M. <ci...@ya...> - 2003-03-22 23:32:20
|
I am writing a (hopefully) portable socket class wrapper
for use with a MUD server I am helping develop. We would
like to take all the conversions of different types to
c-style strings (wont have to worry about it elsewhere in
the code) which are used for both *NIX-style and Winsock
send function. With recieving it will be up to the rest of
the code to figure out what the user means (and what types
to put it in). I am looking for a way for the user's of
this class to be able to do something like this:
//exp_gain = integer varible with the value 600
client.send("You gained %d experience", exp_gain);
Or Better Yet:
client << "You Gained " << exp_gain << " experience";
Output:
You gained 600 eexperience
Does anyone know a good tutorial or short paper. The group
I am working with is a mix of both die-hard C programmers
and C++ programmers. To minimise problems (more complaints)
later on I would like to implement both so which ever style
the programmer is used to is avalible.
Thanks in Advance
=====
Signed
David Mcken
Life Sucks
Live with it
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
|