473,699 Members | 2,835 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change resource dll list while runtime

HY,

my problem is the following:

I want to give a very big application the ability, to change the
language at runtime. It's written in Visual C++ 6.0. All language
depending strings and so on, are already stored in different
resource-dll's. The way, I understand it, there is a list of
resources, which the application goes through, searching for strings.
For example my string is in stringa.dll in english. But I want to have
the application in French, which is all stored in stringb.dll.

Can I somehow replace the pointer (?) in the resource-dll-list with
another one? It's very circuitous to change the main resource pointer
(AfxSetResource Handle()) all the time...

Thank you very much,

Bjoern
Jul 22 '05 #1
2 2922
bj**********@gm x.net (Bj?rn) wrote in news:f2c4f392.0 410071211.f859b 14
@posting.google .com:
HY,

my problem is the following:

I want to give a very big application the ability, to change the
language at runtime. It's written in Visual C++ 6.0. All language
depending strings and so on, are already stored in different
resource-dll's. The way, I understand it, there is a list of


[snip]

And you go spinning off into the realm of platform-specific stuff.... which
is off-topic for comp.lang.c++. In clc++ the topic is Standard C++, which
has no concept of DLLs.... Please try over in the Microsoft programming
groups....
Jul 22 '05 #2
Bj?rn posted:
HY,

my problem is the following:

I want to give a very big application the ability, to change the
language at runtime. It's written in Visual C++ 6.0. All language
depending strings and so on, are already stored in different
resource-dll's. The way, I understand it, there is a list of
resources, which the application goes through, searching for strings.
For example my string is in stringa.dll in english. But I want to have
the application in French, which is all stored in stringb.dll.

Can I somehow replace the pointer (?) in the resource-dll-list with
another one? It's very circuitous to change the main resource pointer
(AfxSetResource Handle()) all the time...

Thank you very much,

Bjoern

I've done this before.

Here was my strategy:

I defined a struct called "Language", and I gave it a member variable for
every string in the program:

struct Language
{
const char* open;
const char* close;
const char* exit;
};
Then I would have a global object of this structure:
Language current_languag e;
And throughout the entire program, this object would be used.
I'd have a function to change the language:
void ChangeCurrentLa nguageToIrish()
{
current_languag e.open = "Oscaill";
current_languag e.close = "Dún";
current_languag e.exit = "Fág";
}
But ofcourse, you could get the strings from anywhere, like in Win32, you
could load them from the resource file within the executable.
-JKop
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2018
by: Carl Scarlett | last post by:
When I display icons in controls from an imagelist, the icons are "corrupted" if they are added from a resource (or a file) but are fine if I add them using the designer at design time. I need to add the icons dynamically at runtime. How can you add the icons at runtime without corrupting the image?
2
3058
by: Gwl | last post by:
I'm writing an application in which the user can change the default ouput language while the program is running. I have no problem to do it when there is only a form opened, but if I have a situation like a second form opened I don't know how I could change the otuput language in the main form and in all the background forms. Any advice? Thanks, G.
2
8531
by: Sanjeeva Reddy | last post by:
hai Anti Keskinen, i have used the following code MyListView->LargeImageList->ImageSize = gcnew System::Drawing::Size(100, 100); // Sets large image size to 100, 100 here i am getting error like "gcnew is undeclared error",how to deeclare 'gcnew" and when i am using in runtime to change the size of images in imagelist in listview control in .net(forms application) by chnging one trckbar(like tb1->Value),
1
3169
by: Kaworu | last post by:
Hi, at first time I want to apologize for my English. I need to change the language of my app and I like to do it changin the caption of the controls in the resource.rc file, or having on resource.rc file for each language, but then I need to use resource.r file in the execution and not in the compile time, can I do it? How ca I do it?. Thank you
13
4176
by: nyt | last post by:
I have a problem of number and text field. I got the database file(mdb) that contains many combo boxes used and its list values are created by "value list" For eg field Field name= 'furniture' , data type='Number' ,Display Control='Combo Box', RowSource Type = 'Value List' and Row Source = ' 0;"chair";1;"Table";2;"Bed" ' Therefore, in data sheet view of table, if we select (1 : Table ) ,
0
2970
by: Mythran | last post by:
I wrote some code that is supposed to enumerate through the specified file's win32 resources and return a string-array of all icon names. When it runs, it returns a string-array with a bunch of numbers in sequential order (1-55 when ran against iexplore.exe). When I open up iexplore.exe in Visual Studio, I see 23 icons. Each icon has 1 or more sizes of the icon...I'm assuming that there are, in fact, 55 icon resources in iexplore.exe,...
1
2534
by: mehdi_mousavi | last post by:
Hi folks, Consider a string that's defined under VS2005 resource editor as myField with the value of myValue. To access the value, I could easily use the Properties.Resources class, for example: global::myNameSpace.Properties.Resources.myField However, I would like to retreive it's string representation of the field's name, i.e., the "myField". How am I supposed to do that?
3
9807
by: raghu sunkara | last post by:
Hi, How Can i Change or Modify Embedded String Resource In An Assembly. I Need To Modify Embedded String Resource In An Assembly. Please Help Me. Thanks Raghu.
1
2338
by: raghu sunkara | last post by:
hi, how to change or modify embedded string resource in an assembly at runtime. please help me. Thanks, Raghu
0
8703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9185
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9050
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8935
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8893
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7773
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2359
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.