|
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 |