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 2 2924 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....
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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?
|
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.
|
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),
|
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
|
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 ) ,
| |
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,...
|
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?
|
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.
|
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
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
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,...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |