|
How to find the language installed or Language package exists or language in OS will support or not?
I failed to use GetUILanguage and EnumUILangauges API's. Any suggestions?
|
|
|
|
|
What problems did you face with using EnumUILanguages .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Actually i didn't understand how to use the API, and also i didn't find any sample for it . If you can help me on how to use this API it will be very useful for myself.
|
|
|
|
|
Here goes -
BOOL CALLBACK EnumUILanguagesProc(
LPTSTR lpUILanguageString,
LONG_PTR lParam
)
{
MessageBox(0, lpUILanguageString, 0, 0);
return TRUE;
}
int main()
{
EnumUILanguages(EnumUILanguagesProc, MUI_LANGUAGE_NAME, 0);
}
If you want the language id instead of the language name, replace MUI_LANGUAGE_NAME with MUI_LANGUAGE_ID.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
To check if the operating system supports the language I believe that you can just call the IsValidLanguageGroup Function[^]
Such as:
BOOL bSupported = IsValidLanguageGroup(LGRPID_INDIC,LGRPID_SUPPORTED);
BOOL bInstalled = IsValidLanguageGroup(LGRPID_INDIC,LGRPID_INSTALLED);
Best Wishes.
-David Delaune
|
|
|
|
|
IsValidLanguageGroup(LGRPID_SIMPLIFIED_CHINESE | LGRPID_TRADITIONAL_CHINESE, LGRPID_INSTALLED);
is returning false when i tried in Windows XP Chinese, but it is returning true in English OS where East Asian language pack installed
|
|
|
|
|
kiranin wrote: IsValidLanguageGroup(LGRPID_SIMPLIFIED_CHINESE | LGRPID_TRADITIONAL_CHINESE, LGRPID_INSTALLED);
is returning false when i tried in Windows XP Chinese, but it is returning true in English OS where East Asian language pack installed
#define LGRPID_TRADITIONAL_CHINESE 0x0009 // Traditional Chinese
#define LGRPID_SIMPLIFIED_CHINESE 0x000a // Simplified Chinese
#define LGRPID_THAI 0x000b // Thai
0x000a | 0x0009 == 0x0B
You just confirmed that the LGRPID_THAI language is not installed on the Windows XP Chinese computer.
Change your code to:
BOOL bSimpleInstalled = IsValidLanguageGroup(LGRPID_SIMPLIFIED_CHINESE, LGRPID_INSTALLED);
BOOL bTradInstalled = IsValidLanguageGroup(LGRPID_TRADITIONAL_CHINESE, LGRPID_INSTALLED);
Best Wishes,
-David Delaune
|
|
|
|
|
Thanks David,
And one more question is there a way to find the Language for Non Unicode programs which can be set through Regional and Language options?
|
|
|
|
|
|
Hi All,
I am facing a serious issue while command line compilation of VC6 COM dlls.
My application will compile several dlls one by one using MSDEV.exe. After compiling some dlls, application will hang on due to indefinite waiting in Registration process of compilation. It will not specific to one particular dll, some times same dll will compile another time it will struck.
It is very much killing me, what might be reason?
If any one have any idea what may be the issue, Please share with me.
Thanks in advance.
Kind Regards,
Sreeram
T.sreeram Murthy
|
|
|
|
|
Hi, I am facing a crash while calling the function CreateWindowEx ,
Here is the code piece i am using.
WNDCLASSEX WndClassEx;
memset( &WndClassEx, 0,
sizeof(WNDCLASSEX) );
WndClassEx.lpfnWndProc = AVThreadMessageProcedure;
WndClassEx.hInstance = (HINSTANCE)g_hModule;
WndClassEx.lpszClassName = AVTHREAD_WINDOW_CLASS;
WndClassEx.hIcon = hIcon;
WndClassEx.hIconSm = hIconSmall;
WndClassEx.cbSize =
sizeof(WndClassEx);
CreateWindowEx( 0, AVTHREAD_WINDOW_CLASS, L
"", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, (HINSTANCE)g_hModule,(LPVOID)this );
Here I am passing the pointer of the calling class in last argument. Application is not crashing always but some time it crashed at this point.
Can you please give some idea about what wrong i am doing here.
Thanks in advance.
Birajendu
SonicWALL
Bangalore
India
|
|
|
|
|
Where is the RegisterClassEx() called?
|
|
|
|
|
Yeah, ofcourse that is being called successfully with out any error.
Birajendu
SonicWALL
Bangalore
India
|
|
|
|
|
May be some problem with the AVThreadMessageProcedure() function? Did you try putting a break point int that function and debug?
|
|
|
|
|
Could you tell us the exact error message ? Where does it crash exactly ? Try to use your debugger to collect more information.
|
|
|
|
|
I can't figure out how to read a files summary (Title, Subject, Author, Category, Keywords, Comments, etc.. The tab under properties).
If anyone could show me how to do this you would make my day
|
|
|
|
|
|
Can anybody tell me why value of b is 3 in this code? what happens with (a=0) exactly?
int a=0;
int b=(a=0)?2:3;
cout<<b;
|
|
|
|
|
Because the statement within parenthesis, which assigns 0 to a , equates to 0 (false), thus assigning 3 to b . If you change it to:
int b = (a = 1) ? 2 : 3; it might make more sense.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
DavidCrow wrote: change it to:
int b = (a = 1) ? 2 : 3;
it might make more sense.
Does it really make more sense?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
In that it would instead assign 2 to b , yes.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Ah, OK, it makes a lot more sense...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
The result of the expression (assignment)
(a=0)
is 0 , i.e. the value of a (that is false for the conditional operator ? ).
hence the result of the expression
VCD_A wrote: (a=0)?2:3
is 3 .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
a=0 is assignment. You probably wanted a==0 (two = signs), which is hte equality test.
One of the things that's nice (when you're experienced), yet horrible (when you're learning) about C and C++ is that assignment is an expression, not a statement, which means that you can do what you've done there.
In other languages like Ada, which class assignment as a statement, you couldn't make that mistake.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
but if your are assigning any thing to any variable(in our case a=0), this statement suppose to a true, and a=1 does, but what is wrong with zero?
|
|
|
|