This is probably the last update of FindFile. Mostly trivial changes but worth doing - I've not updated my web site yet.
================================
10th May 2016. Version 3.2 (JF)
================================
Removed ButtEx64W.lib & ButtEx32W.lib and included ButtonEx.c for both the
32bit and 64bit projects.
There is only one .RC file now for both the 32bit and 64bit versions of FindFile.
"FindFileUni.rc"
Added a Mutex so that only one instance of FindFile can be run at any
one time. See wWinMain().
The total bytes listed are summed and displayed in the status bar after
the scan has finished, this can also be used to show the bytes used on a
drive, partition or in a folder.
In many cases used the macro ARRSIZE(s) to pass size of buffer to a
Windows API instead of a hardcoded number.
Ctrl+C in header window for clipboard copy, see SubClassTextBoxProc(). Select
text with mouse then Ctrl+C will copy the text to the clipboard.
Changed SHRecycleBin() (Shell.c) to send folders to the Recycle Bin as
well as files.
A new Dutch translation has been added to the resource strings by
Siekmanski, and Grincheux has done a better French translation.
Two Dialog message boxes always displayed in English - fixed.
Added ToolTip to the WebSite button on the About Dialogbox explaining what
one will find there.
Removed the icon from the Search button.
Left in the LFCR's for 'View Search Results' in header window, the text
looks better.
Added icons from applications on the Context 'Send To' menu strip.
===================================
EDIT: The attachment has been updated with the version on my web site. 19 May 2016
John
Hello John,
good job. :)
But... my OS is in english, language is set to italian and... Findfile starts in german :o :'(
Maybe it is worth another slight update? ;)
Quote from: frankie on May 10, 2016, 09:12:41 AM
Hello John,
good job. :)
But... my OS is in english, language is set to italian and... Findfile starts in german :o :'(
Maybe it is worth another slight update? ;)
Hmm, not sure what the cause is, it should just take what the OS gives it. Why you would get German I don't know.
Edit: I don't do anything about the language Frankie, the OS does all the work. It is selecting German strings from the resource - but why?
John
Thank's John!
frankie:
What language ID's you get?
#define UNICODE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
int __cdecl DisplayThreadLocale(void)
{
wchar_t szTmp[512];
LCID lcidt = GetThreadLocale();
LCID lcids = GetSystemDefaultLCID();
LCID lcidu = GetUserDefaultLCID();
wsprintf(szTmp,
L"ThreadLocale 0x%04X\nSystemDefaultLCID 0x%04X\nUserDefaultLCID 0x%04X",
lcidt, lcids, lcidu);
MessageBox(0, szTmp, L"DefaultLCID", MB_OK);
return 0;
}
void __cdecl WinMainCRTStartup(void)
{
DisplayThreadLocale();
ExitProcess(0);
}
Hello Timo,
I get Italian LCID=0x410 (see image).
John maybe that if the local is not found the default goes to german and not english as it should do.
I'll make a check as I have time. Cheers. :)
Quote from: frankie on May 10, 2016, 11:43:20 AM
John maybe that if the local is not found the default goes to german and not english as it should do.
I'll make a check as I have time. Cheers. :)
Ok.
As you say it should default to english.
John
John I think that the default language should be english.
Anyway the problem is that when a resource is not found for the current LCID the OS defaults to the lower resource LCI. In our case it is the german, 0x0407, which is less than the british english, 0x0809.
The solution is to define language and sublanguage of all common resource, actually defined respectively as LANG_ENGLISH and SUBLANG_ENGLISH_UK, as neutral: LANG_NEUTRAL and SUBLANG_NEUTRAL, which value is 0x0 for both.
In this way any LCID not found will default to neutral that is in english.
You'll find attached an emended version of resources file "FindFileUni.rc".
You can make tests by setting undefined languages like spanish or italian:
int APIENTRY wWinMain(HINSTANCE hinst, HINSTANCE hinstPrev, wchar_t * lpCmdLine, int nCmdShow)
{
/* These calls to SetLanguage() are only for testing purposes.
Normally the Locale is set automatically for your locale by the OS.
For completeness this also needs to be done for the other thread in
Private_FindFile()
*/
SetLanguage(0x040a); // Spanish (Spain)
//SetLanguage(0x0410); // Italian (Italy)
//SetLanguage(0x0809); // English (UK)
//SetLanguage(0x040c); // French
//SetLanguage(0x0407); // German (Standard)
//SetLanguage(0x0416); // Portuguese (Brazil)
//SetLanguage(0x040b); // Finnish
//SetLanguage(0x0419); // Rusian
//SetLanguage(0x0413); // Dutch
This can't be right, having LANG_NEUTRAL and SUBLANG_NEUTRAL results in not being able to set any other of those languages you have seen in wWinMain()
//SetLanguage(0x040c); // French
//SetLanguage(0x0407); // German (Standard)
//SetLanguage(0x0416); // Portuguese (Brazil)
//SetLanguage(0x040b); // Finnish
//SetLanguage(0x0419); // Rusian
//SetLanguage(0x0413); // Dutch
John
I didn't checked... :(
Let me check again...
Frankie can you set english in wWinMain when my original RC file is used?
If so I could make a check for the other languages and set english if none of them is found.
However which to use?
GetThreadLocale();
GetSystemDefaultLCID();
GetUserDefaultLCID();
On my system the ThreadLocale is 'english us' the others are 'english uk'.
John
John,
According to this (https://msdn.microsoft.com/en-us/library/cc194810.aspx) MS doc resource loading should use the value from GetThreadLocale();.
But according the same doc:
QuoteIf the FindResource and FindResourceEx functions do not find any resources that match the language ID's primary language, they search for resources tagged as "language-neutral." This language ID is useful for resource elements such as icons or cursors that are identical for all languages. If a bitmap or an icon will differ for some languages, you can define one language-neutral bitmap as the default and specify language IDs for as many other customized bitmaps as required. For example, bidirectional applications might require bitmaps with right-to-left directionality. Because the FindResource and FindResourceEx functions always search for specific language IDs first, they will always find a bitmap tagged with that language ID before they find one tagged as language-neutral. The search algorithm they follow is summarized in the following list:
- Primary language/sublanguage
- Primary language
- Language-neutral
- English (skipped if primary language is English)
- Any
It should have worked.
Check for language isn't very elegant anyway, but seems the only one to work:
int APIENTRY wWinMain(HINSTANCE hinst, HINSTANCE hinstPrev, wchar_t * lpCmdLine, int nCmdShow)
{
/* These calls to SetLanguage() are only for testing purposes.
Normally the Locale is set automatically for your locale by the OS.
For completeness this also needs to be done for the other thread in
Private_FindFile()
*/
//SetLanguage(0x040a); // Spanish (Spain)
//SetLanguage(0x0410); // Italian (Italy)
//SetLanguage(0x0809); // English (UK)
//SetLanguage(0x040c); // French
//SetLanguage(0x0407); // German (Standard)
//SetLanguage(0x0416); // Portuguese (Brazil)
//SetLanguage(0x040b); // Finnish
//SetLanguage(0x0419); // Rusian
//SetLanguage(0x0413); // Dutch
//Set english as default language for those not supported
switch(GetThreadLocale())
{
case (0x0809): // English (UK)
case (0x040c): // French
case (0x0407): // German (Standard)
case (0x0416): // Portuguese (Brazil)
case (0x040b): // Finnish
case (0x0419): // Rusian
case (0x0413): // Dutch
break;
default:
SetThreadLocale(MAKELCID(0x0809, SORT_DEFAULT));
}
// This needs to be here for the MsgBox() call that requires ButtonEx stuff.
InitButtonEx();
....
Yes not good - thanks for all your help, I've included the check.
I have updated the original attachment.
EDIT: And in case anyone needs to know the check and setting has to be done in wWinMain() and also in another thread - Private_FindFile() which is in Find.c
John
Simplified test project to check how this works :-\#define WIN32_LEAN_AND_MEAN
#include <windows.h>
void SetLanguage(LANGID lid);
void __cdecl WinMainCRTStartup(void)
{
TCHAR szTmp[256];
//SetLanguage(0x0410); // Italian (Italy)
SetLanguage(0x040c); // French
LoadString(GetModuleHandle(NULL), 10001, szTmp, sizeof(szTmp)/sizeof(szTmp[0]));
MessageBox(0,szTmp,0,MB_OK);
ExitProcess(0);
}
void SetLanguage(LANGID lid)
{
typedef LANGID (WINAPI *fnPtr) (LANGID wReserved);
if ((GetVersion() & 0x00FF) > 5) {// Vista =>
LANGID lid2;
fnPtr pSetThreadUILanguage = (fnPtr)GetProcAddress(
GetModuleHandle(TEXT("kernel32.dll")), "SetThreadUILanguage");
if (pSetThreadUILanguage)
// lid2 should equal lid
lid2 = (*pSetThreadUILanguage)(lid);
} else {
SetThreadLocale(MAKELCID(lid, SORT_DEFAULT));
}
}
#include <windows.h>
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
STRINGTABLE { 10001, "English US" }
LANGUAGE LANG_GERMAN,SUBLANG_GERMAN
STRINGTABLE { 10001, "German" }
LANGUAGE LANG_FRENCH,SUBLANG_FRENCH
STRINGTABLE { 10001, "French" }
#include <windows.h>
LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
STRINGTABLE { 10001, "Neutral" }
For Windows 10:
if there is NEUTRAL language, it is chosen
otherwise ENGLISH
What happens with FindFile if you take out the Finnish strings - also not have Frankie's code that sets English anyway? switch/case stuff.
John
I see english texts in Windows 10
But German text in English version Windows 7.
So Windows 10 behaves as expected.
Frankie, what OS are you using?
John
John I'm using Win7.
In my test I have simply renamed the language english as neutral I have not tried to add the neutral.
I'm busy now, but maybe it is worth a check.
I'll do as soon as I can.
I'm leaving in that code you supplied anyway just in case. It's been changed a little so that both in wWinMain() and Private_FindFile() there is a call to IsLanguageSupported() and that is in utils.c.
The latest last ever update is mow on my web site, if anyone is interested.
This is from utils.c
// From example Timo put on the PellesC forum.
void SetLanguage(LANGID lid)
{
typedef LANGID (WINAPI *fnPtr) (LANGID wReserved);
if ((GetVersion() & 0x00FF) > 5) // Vista =>
{
LANGID lid2;
fnPtr pSetThreadUILanguage = (fnPtr)GetProcAddress(
GetModuleHandle(L"kernel32.dll"), "SetThreadUILanguage");
if (pSetThreadUILanguage)
// lid2 should equal lid
lid2 = (*pSetThreadUILanguage)(lid);
}
else
{
SetThreadLocale(MAKELCID(lid, SORT_DEFAULT));
}
}
void IsLanguageSupported(void)
{
//Set english as default language for those not supported
switch (GetThreadLocale())
{
case (0x0809): // English (UK)
case (0x040c): // French
case (0x0407): // German (Standard)
case (0x0416): // Portuguese (Brazil)
case (0x040b): // Finnish
case (0x0419): // Rusian
case (0x0413): // Dutch
break;
default:
SetLanguage(0x0809);
}
// These calls to SetLanguage() are only for testing purposes.
// Normally the Locale is set automatically for your locale by the OS.
//SetLanguage(0x040a); // Spanish (Spain)
//SetLanguage(0x0410); // Italian (Italy)
//SetLanguage(0x0809); // English (UK)
//SetLanguage(0x040c); // French
//SetLanguage(0x0407); // German (Standard)
//SetLanguage(0x0416); // Portuguese (Brazil)
//SetLanguage(0x040b); // Finnish
//SetLanguage(0x0419); // Rusian
//SetLanguage(0x0413); // Dutch
}
John
frankie was right:
LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
before english/default string table correct that problem in Windows 7.
Quote from: TimoVJL on May 11, 2016, 01:34:43 PM
frankie was right:
LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
before english/default string table correct that problem in Windows 7.
So, without the actual strings - like this it works.
LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_UK
STRINGTABLE
{
1, "Explore Folder"
John
And does it work in Windows 10?
John
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US is cure for Windows 7 EN
How that works in different version of Windows 7? Like UK?
EDIT:
Works in Windows 8.1 FI
Quote from: TimoVJL on May 11, 2016, 02:41:04 PM
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US is cure for Windows 7 EN
How that works in different version of Windows 7? Like UK?
Earlier I was going to ask that but didn't.
It works ok here on Win7. Does it work for Frankie.
Does it work for Win10?
John
It seems to work, but if I set spanish I get italian again :o
I can't consider it a success... >:(
Quote from: frankie on May 11, 2016, 03:26:32 PM
It seems to work, but if I set spanish I get italian again :o
I can't consider it a success... >:(
But this does right ?
LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_UK
STRINGTABLE
{
1, "Explore Folder"
Timo said it worked on his windows 7.
John
Only
LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
or
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
works somehow.
Empty LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL is useless.
No.
It doesn't work.
Using:
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
Seems to work, but after I added the italian translation it give me italian if I set spanish language.
I Attach the new rc file with italian translation.
In short the problem is not present when using a localization for which the translation exists, but when it is invoked in a locale that is not in the resource. In this case the system picks the language it wants... >:(
Thanks for the new translation Frankie.
I will stick with this code
//Set english as default language for those not supported
switch (GetThreadLocale())
{
case (0x0809): // English (UK)
case (0x040c): // French
case (0x0407): // German (Standard)
case (0x0416): // Portuguese (Brazil)
case (0x040b): // Finnish
case (0x0419): // Rusian
case (0x0413): // Dutch
break;
default:
SetLanguage(0x0809);
}
It should always work.
Thanks to both of you for your help.
John
Frankie, you didn't translate all the strings. ???
John
John,
some definitions don't have a direct translation in italian, and usually the english word has become standard name.
Anyway I still don't like the workaround >:(. Is horrible, and difficult to maintain (you have to remember to update the list of languages in the check code).
So I have prepared a different approach. In each translation I added a string that is the language code stringized (a neologism ;)). Then I modified the check in the following way:
void IsLanguageSupported(void)
{
//Check if local language is supported, and if not set english as default
char buf[16];
if (LoadStringA(g_hInst, HAVE_LANGUAGE, buf, 16)) //Load the system choosed locale string
{
WORD ResLid = strtol(buf, NULL, 16);
WORD SysLid = GetThreadLocale();
if (SysLid == ResLid) //We got our locale
return; //nothing to do.
//Do we match at least the primary language?
if (PRIMARYLANGID(SysLid) == PRIMARYLANGID(ResLid))
return; //Yes primary language matches. We will get close translation.
}
//If we are here we couldn't have load the string or we haven't find a suitable
//language. We then stick to english uk as default.
SetLanguage(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_UK));
}
This simplify the maintenance because it is one of the required strings and you can't omit it, and any new language will be automatically recognized.
Find attached the emended FindFileUni.rc and FindFileRes.h.
Have a nice evening.
Thanks again.
This is the string section that you missed.
STRINGTABLE
{
#ifdef FF64
64, "FindFile64 Messaggio..."
#else
64, "FindFile32 Messaggio..."
#endif
65, "OK"
66, "SendTo Menu Items"
67, "Add or Edit a SendTo Menu Item"
68, "Edit Item"
69, "Edit SendTo Menu"
70, "Program"
71, "Choose Either a Folder or Program and enter the Display Name"
72, "Display Name"
73, "The Folder Or Program"
74, "Clear All"
75, "Reset"
76, "More Than Bytes"
77, "Less Than Bytes"
78, "Fill in one or more Parameters (dates require dd/mm/yyyy)"
79, "After"
}
I will try out that new code.
John
Final time.
I comment out finnish resource and other useless and chance line before english string table:
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_UK
to
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
and i got english text, before that it was german.
John you're right :-[
I have to complete!
Timo it seems that the resource is selected casually using the first one it finds.
I'm sure that there is a reason behind it, but I've not identified it :(
Quote from: frankie on May 11, 2016, 11:11:00 PM
John you're right :-[
I have to complete!
Timo it seems that the resource is selected casually using the first one it finds.
I'm sure that there is a reason behind it, but I've not identified it :(
I look forward to the new translation. :)
We all thought that it would default to English and I think Timo is right, it won't default to LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_UK but will to LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US.
Frankie please give it one more go, comment out your Italian strings set the two LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US and don't try to set anything, just let it run. I suspect you will get English.
Btw, both you code solutions are fine but I'd rather use the language defines.
John
I should have cleared the points now :) (or at least I hope so :P)
Let expose the points:
Win7 is broken in some way and don't search resources as specified in the document that I cited in one of my first posts, but when doesn't find an exact matching, language and sublanguage, immediately defaults to the first resource it finds.
This behavior is partly deliberate because the language "NEUTRAL" have the lower value, 0, and the resource are ordered in the exe to speed-up search using BTree algorithms. But if the neutral version is missing than the first resource at the top of the binary tree is the one that has the lower value.
In our first case the german had the lower value, and it become the default, but when ENGLISH_US has been introduced, that has an even lower value=0x0009, then it becomes the default and seemed to work.
This is confirmed by Timo tests where he added chinese, that has a lower LCI, and it become the default.- Another point is that the system don't use the value of GetThreadLocale() for the GUI interface, but uses the GUI preferred locale as got from GetThreadUILanguage().
In my specific case the system has ENGLISH_US set as preferred GUI locale :(, and this was my problem!!! >:(
With ENGLISH_UK in resources my system behaved as not finding its GUI language, ENGLISH_US, defaullting to the lower lcid=german.
Changing resource sub language from ENGLISH_UK to ENGLISH_US worked because it was the GUI preferred one, but putting back italian resources it remained ENGLISH_US as in the preferred GUI LCID! >:(
Conclusion:
- The reference is the value from GetThreadUILanguage(), not the thread LCID.
- The default language have to be marked as LANGUAGE_NEUTRAL.
And now the missing italian translations:
STRINGTABLE
{
#ifdef FF64
64, "FindFile64 Messaggio..."
#else
64, "FindFile32 Messaggio..."
#endif
65, "OK"
66, "Voci del menu SendTo"
67, "Aggiungi o edita voci del menu SendTo"
68, "Edita Voce"
69, "Edita Menu SendTo"
70, "Programma"
71, "Scegliere una cartella o un programma e inserire il nome da visualizzare"
72, "Visualizza Nome"
73, "Cartella o Programma"
74, "Cancella tutto"
75, "Ripristina"
76, "Più di Bytes"
77, "Meno di Bytes"
78, "Compilare uno o più parametri (date in formato gg/mm/aaaa)"
79, "Dopo"
}
Thank you for the translation.
Here, the resources will default to SUBLANG_ENGLISH_US even when SUBLANG_ENGLISH_UK is present.
So unless specifically asked for UK, I will get US. This is on Win7. I think the same applies to Timo's Win7.
I will think about the points you raised. :)
John
John the reason, as I told you, is that win7 is broken, and select ENGLISH_US=0x0409 that is less tha ENGLISH_UK=0x0809.
Make a trial add danish=0x0406, and check if default is still ENGLISH_US. ;)
Quote from: frankie on May 12, 2016, 11:57:59 AM
John the reason, as I told you, is that win7 is broken, and select ENGLISH_US=0x0409 that is less tha ENGLISH_UK=0x0809.
Make a trial add danish=0x0406, and check if default is still ENGLISH_US. ;)
Yes it is, see image.
// RESOURCE SCRIPT generated by "Pelles C for Windows, version 8.00".
LANGUAGE LANG_DANISH,SUBLANG_DANISH_DENMARK
STRINGTABLE {1, "Danish"}
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_UK
STRINGTABLE{1, "EnglishUS"}
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
STRINGTABLE{1, "EnglishUS"}
And the code of the project
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
void SetLanguage(LANGID lid);
void __cdecl WinMainCRTStartup(void)
{
TCHAR szTmp[256];
LoadString(GetModuleHandle(NULL), 1, szTmp, sizeof(szTmp)/sizeof(szTmp[0]));
MessageBox(0,szTmp,0,MB_OK);
ExitProcess(0);
}
void SetLanguage(LANGID lid)
{
typedef LANGID (WINAPI *fnPtr) (LANGID wReserved);
if ((GetVersion() & 0x00FF) > 5) {// Vista =>
LANGID lid2;
fnPtr pSetThreadUILanguage = (fnPtr)GetProcAddress(
GetModuleHandle(TEXT("kernel32.dll")), "SetThreadUILanguage");
if (pSetThreadUILanguage)
// lid2 should equal lid
lid2 = (*pSetThreadUILanguage)(lid);
} else {
SetThreadLocale(MAKELCID(lid, SORT_DEFAULT));
}
}
As for Timo's chinese experiment, if you take away the default the OS can't but choose something else.
John
However my GetThreadLocale(); returns US and I don't know how to change that to UK. I have set UK everywhere that I've seen on system settings.
EDIT: Both GetSystemDefaultLCID(); and GetUserDefaultLCID(); return UK.
EDIT1:
In the registry is this
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MUI\UILanguages\en-US]
"LCID"=dword:00000409
"Type"=dword:00000091
Do I need to add an entry for the UK
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MUI\UILanguages\en-UK]
"LCID"=dword:00000809
"Type"=dword:00000091 // what is this?
John
#define UNICODE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#pragma comment (lib, "msvcrt.lib")
int __cdecl DisplayThreadLocale(void)
{
LCID lcidt = GetThreadLocale();
LCID lcids = GetSystemDefaultLCID();
LCID lcidu = GetUserDefaultLCID();
LCID lcidui = GetThreadUILanguage();
wprintf(L"ThreadLocale\t\t0x%04X\nSystemDefaultLCID\t0x%04X\n"
"UserDefaultLCID\t\t0x%04X\nThreadUILanguage\t0x%04X\n",
lcidt, lcids, lcidu, lcidui);
return 0;
}
//int main(void)
void __cdecl mainCRTStartup(void)
{
DisplayThreadLocale();
ExitProcess(0);
return 0;
}
outputs in Windows 7 EN with FI localeThreadLocale 0x040B
SystemDefaultLCID 0x040B
UserDefaultLCID 0x040B
ThreadUILanguage 0x0409
EDIT:
Here is my image, changed back as it was before I changed the registry. :)
409 in yours too.
John
Anyway guys we can stop all this - as I said before I will use code to ensure that English is selected when the other languages are not present.
IsLanguageSupported()
BUT why have Timo and I got 0x0409 set for threads?
John
My Windows 7 Home Premium is EN version.
John, there are too many possibilities for which the preferred GUI LCID is set differently, even some well known buggy sw (you can google).
Anyway let me give a couple of suggestions, add a language selection menu, put translations in separate files (i.e. en.rc for english, it.rc for italian and so on.
A fast way to overcome bad GUI LCID could be:
SetLanguage(GetThreadLocale());
Forcing GUI LCID to the local thread LCID, but don't know how it could be correct, because maybe the user voluntarily set it to a different language.
Thank you both for all your efforts it's been really appreciated and a pleasure.
John
Quote from: frankie on May 12, 2016, 04:36:18 PM
A fast way to overcome bad GUI LCID could be:
SetLanguage(GetThreadLocale());
Forcing GUI LCID to the local thread LCID, but don't know how it could be correct, because maybe the user voluntarily set it to a different language.
Not good for Windows 10 non US.
Windows 10 FI
ThreadLocale 0x0809
SystemDefaultLCID 0x040B
UserDefaultLCID 0x040B
ThreadUILanguage 0x040B
This is definitely the last update for FindFile.
From the change log
=================================================
18th May 2016. Version 3.2 (JF)
=================================================
Frankie supplied an Italian translation of the resource strings
which has been added to the project.
On the 'Send To' context menu one could Send To a folder but
not a drive - fixed.
Added Unicode switch to Stephan Zorn's command line code.
You might be able to guess the switch /U+
Bug in DeleteListViewEntres() Fixed
swprintf(s, PATH_SIZE, s, g_fileopts.count);
There were occasions when the icon would continue to be
displayed in the image window box when it shouldn't.
Added this code to function ClearPreview()
if(g_hIcon != NULL){
DestroyIcon(g_hIcon);
g_hIcon = NULL;
}
Download from Here (http://www.johnfindlay.plus.com/pellesc/utils/utils.html)
John
Although all my system settings were set to English UK, using GetThreadLocale() returned English US.
Found this on stackoverflow forum.
On the forum someone suggested that (on Windows 7) one has to first change to a different language and then back to ones own. It worked, now I get English UK when using GetThreadLocale().
John