|
-
November 19th, 2009, 10:50 AM
#1
Localization MessageBoxEx
Hi there,
i'm currently trying to localize an application but got problems when the application locale is different from the OS locale.
I'm trying to display a message boxes with the buttons in localized language.
To do so im using the MessageBoxEx function
int MessageBoxEx(
HWND hWnd,
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType,
WORD wLanguageId
);
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
For testing i'm using a WindowsXP Pro SP3 machine with an english installation and the french MUI pack installed.
Developing with visual studio 2008 SP1 and windowsSDK 7.0
my function call is the following:
MessageBoxEx(NULL,"mymessage","mytitle",MB_YESNO | MB_ICONWARNING, MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US))
this works out great.
when using english or french as OS language setting my message box shows in english language, complete with the "yes" and "no" buttons
while this
MessageBoxEx(NULL,"monmessage","montitle",MB_YESNO | MB_ICONWARNING, MAKELANGID(LANG_FRENCH,SUBLANG_FRENCH))
is a different story.
when using french language as OS language it shows ok, with "oui" and "non" as button labels
but when using the same executable and english as os language the button labels show as "yes" and "no".
The problem is that im not able to change the language on an english OS language where on the french OS it just works fine.
My application should be independent from the os locale an it should be configurable which language is used.
i tried to google this and found a lot but couldn't find a definitive answer wheter its a problem on my side or it isn't possible to do what i want with MessageBoxEx and i must build my own solution.
can someone please give me a definitive answer?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|