|
Thnx for the response...
jas tell me one simple thing...
This is my basic doubt
If I right click on a resource in the Resource view and then on 'Insert copy' and choose some other language...say German..then a copy of that resource will be added...but will it have be in English or German.....? Please do me the favor by checking this thing on ur machine...
On my VS 6.0...it always comes in English....they don't get translated to German on the fly...
All this while I do not change the language from Control Panel->Regional Setting n langs..to some other language...it is english...always...
And, wat language hot switching hve u referred to in ur response......?
Maybe, I am missing some locale setting change...
Thnx...
-- modified at 13:47 Thursday 1st February, 2007
...A Programmer may or may not be the master of the programming language grammar...
|
|
|
|
|
When you choose the language while adding resources, it will not perform any translation. Infact, all it will do is add the new resources under a different codepage. You will need to translate all the text strings yourself. Also, when using two languages and two codepages in the same resource, you will still need to add code to your exe to be able to switch between the two.
Whenever I build a multi language app, I will always create a dll for each language. All the dll's need to contain are the dialogs and strings, with the same ID's, translated into various languages. Then in the exe, I will add code to scan the dll folder hence checking for what languages are available. I then dynamicaly link to a single dll, depending on the OS's language.
This way, I can add more languages simply by creating a new dll. The exe is also able to hot switch between languages by simply unloading the dll and loading a new one in it's place.
|
|
|
|
|
Hi....
I think I got my answer that there will be no automatic translation and I have to edit them manually....ok...rest of the theory is clear to me..like using that dlls n all...
Well...thanx a lot for the answer....
...A Programmer may or may not be the master of the programming language grammar...
|
|
|
|
|
How to show Video Preview from Video Packets in VC6?
OR How to use VLC in VC6? Is there any ActiveX Control of VLC that can be used in VC6?
|
|
|
|
|
|
See here[^] if its helpfuls
|
|
|
|
|
Hi
All
I am doing multilingual application in which i am loading string from DLL in client application, but i want to set this string to Static text of Dialog box. So how can done it.
Thanks and Regards
Atul Mahajan
Atul
|
|
|
|
|
M. Atul wrote: but i want to set this string to Static text of Dialog box. So how can done it.
How far have you done.
|
|
|
|
|
This forum is here to help, not give you answers to homework assignments. Perhaps if you could show us what you have already tried we would be able to help you a little more.
|
|
|
|
|
M. Atul wrote: i want to set this string to Static text of Dialog box. So how can done it.
With SetWindowText() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Do you want to set text you can use of SetWindowText or WM_SETTEXT
|
|
|
|
|
I have a code as follows:
CSpanLoad *pBDLd;
CSpanLoad *pA3DLd;
---
---
--
pBDLd = pA3Ld;
//this assignment has to call the function:
void CSpanLoad::operator=( const CTRYObject &src ).
CTRYObject is inherited from CObject class.But now the assignment is not calling void CSpanLoad::operator=( const CTRYObject &src ) instead is calling the operator= of CObject.
If i give *pBDLd = *pA3Ld then it shows the compilation error as:
error C2248: 'CObject::operator =' : cannot access private member declared in class 'CObject'"
see declaration of 'CObject::operator ='
see declaration of 'CObject'
This diagnostic occurred in the compiler generated function 'CPtrArray &CPtrArray::operator =(const CPtrArray &)'
Why the error?
**NOTE:
*pBDLd = *pA3Ld was working in VC6 properly without error.The error came in VS2005(.net).For correcting that only i changed into
pBDLd = pA3Ld;//which is not working as intended
Plz help..
Thanks and Regards
|
|
|
|
|
sheetal_06 wrote: If i give *pBDLd = *pA3Ld then it shows the compilation error as:
In this case assignment operator for CSpanLoad will be called.
|
|
|
|
|
sheetal_06 wrote: error C2248: 'CObject::operator =' : cannot access private member declared in class 'CObject'"
see declaration of 'CObject::operator ='
see declaration of 'CObject'
This diagnostic occurred in the compiler generated function 'CPtrArray &CPtrArray::operator =(const CPtrArray &)'
This error is due to,You are using CPtrArray object(which you have ot mentioned) in your app. in way its assignment operotor is is being called.
You need to show CPtrArray class object usage in your application.
|
|
|
|
|
This simply copies a pointer:
pBDLd = pA3Ld;
CObject hides the assignment operator to protect you from making a mistake.
Therefore, you need to define and implement an assignment operator for classes derived from
CObject:
class CSpanLoad : public CObject
{
...
public:
CSpanLoad &operator=(const CSpanLoad &Src);
};
CSpanLoad &CSpanLoad::operator=(const CSpanLoad &Src)
{
return *this;
}
Then *pBDLd = *pA3Ld will work.
Mark
-- modified at 20:36 Thursday 1st February, 2007
|
|
|
|
|
//.h
class CCGMObject : public CObject
{
-----
};
class CSpanLoad : public CCGMObject
{
...
public:
void operator=( const CCGMObject& );
};
//.cpp
void CSpanLoad::operator=(const CCGMObject& Src)
{
// copy Src object to this object
}
Above code is not working..
Now when i made the code as follows according to ur suggestion it is working....Why?Could u plz explain..
class CCGMObject : public CObject
{
-----
};
class CSpanLoad : public CCGMObject
{
...
public:
void operator=( const CSpanLoad & );//changed
};
//.cpp
void CSpanLoad::operator=(const CSpanLoad & Src)//changed
{
// copy Src object to this object
}
CSpanLoad *pALd,*pBLd;
*pBLd = *pAld;
Thanks
-- modified at 0:27 Friday 2nd February, 2007
|
|
|
|
|
What do you mean by not working? Didn't compile? Didn't link? Didn't run?
What error messages?
|
|
|
|
|
It didn't compile..Shows error as:
error C2248: 'CObject::operator =' : cannot access private member declared in class 'CObject'"
see declaration of 'CObject::operator ='
see declaration of 'CObject'
This diagnostic occurred in the compiler generated function 'CPtrArray &CPtrArray::operator =(const CPtrArray &)'
This error is coming only when i compile in VS2005.In VC6 it is not coming!
|
|
|
|
|
sheetal_06 wrote: This diagnostic occurred in the compiler generated function 'CPtrArray &CPtrArray::operator =(const CPtrArray &)'
Where are you using a CPtrArray? I haven't seen that in your code so far.
Are you trying to assign one array to another with the = operator?
|
|
|
|
|
CPtrArray is a compiler generated function..
I am trying to copy the contents of one pointer into another...
|
|
|
|
|
Ok. In order for a CPtrArray to be copied, the objects in the array need to be copyable.
The assignment operator isn't virtual which is why your code didn't compile.
If copying CSpanLoad objects then the CSpanLoad class needs to have an assignment operator, even
if it is derived from a class which has an assignment operator defined.
Mark
|
|
|
|
|
hi all,
i want to create a user friendly interface for other MS products the question is that VB.NET sends string value and C++ APIs require char*
project consist of VB application -> C# class library -> C++ class library(managed)
Now, when i create a function which accepts char* it raises error cannot convert string to char*
and when i change the function to System::String it is pain to convert it to char* can any one please tell me how to make it work
Thanks!
Shahzeb
|
|
|
|
|
this is a question for the C++/CLI forum[^]. please move your post consequently
|
|
|
|
|
How to get complete path successfully as command line
I have added keys TestCommandLine.exe %L to HKEY_CLASSES_ROOT -> Folder so that on right click the folder path will be passed as command line and use cout<< arg[1] to display command line from TestCommandLine.exe. This path truncated whenever there is space in the path.
For example: If i right click and select the menu @ C:\System\New Folder
The program prints upto C:\System\New. Parts after space ignored
How to solve this?
Thanks
Anil
|
|
|
|
|
The space is a delimiter. To get around this, you need to put the argument in quotes
TestCommandLine.exe "%L"
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|