Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » OS Problems etc., Win32, POSIX, MacOS, FreeBSD, X11 etc » GetUserDefaultUILanguage identifier not found (GetUserDefaultUILanguage identifier not found)
GetUserDefaultUILanguage identifier not found [message #44790] Sun, 28 June 2015 15:27 Go to next message
awksed is currently offline  awksed
Messages: 61
Registered: April 2012
Member
Hi,

Windows CtrlLib app.

Despite #include <windows.h> I get the compiler error: GetUserDefaultUILanguage identifier not found.

I have often hit this problem with other windows functions, e.g. WideCharToMultiByte. Most windows O/S calls seem to work but some give problems.

How do I get all the windows system calls to work with U++? Or are there U++ equivalents?

Thanks,

Jan
Re: GetUserDefaultUILanguage identifier not found [message #44792 is a reply to message #44790] Sun, 28 June 2015 22:56 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

The most important thing in multi platform frameworks is that you shouldn't use operating system related methods at all in your applications. Please notice that code writing in the way you are talking about didn't compile under Linux.

Ultimate++ is such powerful framework and has language related function, so "GetUserDefaultUILanguage" is not needed anymore. For more information please read following topic: http://www.ultimatepp.org/srcdoc$Core$i18n$en-us.html.

For equivalents please search in documentation, you can do this easily by searching in Google box located on the left side of this website (For some reason it is only available outside forum Sad ).

Equivalent for function "GetUserDefaultUILanguage";
SetLanguage(GetSystemLNG()); // <- You should do this at the begging of your app then macro "t_" should load translated string.


P.S.
Don't forget to create translation file (.t extension). To synchronize translation please click on flags icon inside ide.

Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Sun, 28 June 2015 23:05]

Report message to a moderator

Re: GetUserDefaultUILanguage identifier not found [message #44793 is a reply to message #44792] Mon, 29 June 2015 11:37 Go to previous messageGo to next message
awksed is currently offline  awksed
Messages: 61
Registered: April 2012
Member
Hi Klugier,

Thank you for your reply. But unfortunately you answered a question I did not ask.

The question was (re-paraphrased) "Why does #include <windows.h> fail to provide some prototypes?".

Quote:
Please notice that code writing in the way you are talking about didn't compile under Linux.


It did - hint:

#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64))

#else

#endif

I have vast amount of legacy (cross-platform) code that has to be incorporated into U++ GUI apps. Including a language system that addresses issues that others fail to.

Anyway, thank you for your attempt to help.

Perhaps Mirek could explain why #include <windows.h> (suitably wrapped in #ifdefs) fails to provide some prototypes (that I need for legacy code to work).

With kind regards,

Jan

Re: GetUserDefaultUILanguage identifier not found [message #44857 is a reply to message #44792] Thu, 09 July 2015 11:51 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Klugier wrote on Sun, 28 June 2015 22:56
Hello,

The most important thing in multi platform frameworks is that you shouldn't use operating system related methods at all in your applications. Please notice that code writing in the way you are talking about didn't compile under Linux.



IMO, that is not quite correct attitude. Multiplatform framework should allow you to share MOST of code, but there are things that are not worth covering by framework. That is why we have those PLATFORM_xxx macros...
Re: GetUserDefaultUILanguage identifier not found [message #44858 is a reply to message #44790] Thu, 09 July 2015 11:54 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
awksed wrote on Sun, 28 June 2015 15:27
Hi,

Windows CtrlLib app.

Despite #include <windows.h> I get the compiler error: GetUserDefaultUILanguage identifier not found.

I have often hit this problem with other windows functions, e.g. WideCharToMultiByte. Most windows O/S calls seem to work but some give problems.

How do I get all the windows system calls to work with U++? Or are there U++ equivalents?

Thanks,

Jan


Quick googling revealed that this is not in windows.h. You have to include Winnls.h.

(U++ does not include this file).
Previous Topic: [Debian, Ubuntu] Add "sox" package dependency
Next Topic: Heap Leaks on Linux when migrating to new distro and newer UPP
Goto Forum:
  


Current Time: Fri Mar 29 02:59:28 CET 2024

Total time taken to generate the page: 0.02240 seconds