Home » U++ Library support » FileSel&FileList, Path » FileSel and international files problem when getting icon image
Re: FileSel and international files problem when getting icon image [message #18753 is a reply to message #18542] |
Sun, 19 October 2008 22:48 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
koldo wrote on Tue, 07 October 2008 07:17 | Hello all
I have found a problem when reading international file names. In these cases the icon is not readed.
Searching around I have found that the struct FileIconMaker has a member declared String file. If the file name has non english characters the function virtual Image Make() does not work.
To solve it I simply change this in FileSel.cpp:
for(int i = 0; i < 2; i++) {
SHFILEINFO info;
SHGetFileInfo(file, dir ? FILE_ATTRIBUTE_DIRECTORY : FILE_ATTRIBUTE_NORMAL, &info, sizeof(info),
with this;
WString wfile = file.ToWString();
for(int i = 0; i < 2; i++) {
SHFILEINFOW info;
SHGetFileInfo(wfile, dir ? FILE_ATTRIBUTE_DIRECTORY : FILE_ATTRIBUTE_NORMAL, &info, sizeof(info),
and it works.
Best regards
Koldo
|
Well, first I have applied this patch, but I am afraid this would not work with Win98.
Could you try this first?
for(int i = 0; i < 2; i++) {
SHFILEINFO info;
SHGetFileInfo(ToSystemCharset(file), dir ? FILE_ATTRIBUTE_DIRECTORY : FILE_ATTRIBUTE_NORMAL,
&info, sizeof(info),
SHGFI_ICON|SHGFI_SMALLICON|(exe ? 0 : SHGFI_USEFILEATTRIBUTES));
Mirek
[Updated on: Sun, 19 October 2008 22:50] Report message to a moderator
|
|
|
|
|
FileSel and international files problem when getting icon image
By: koldo on Tue, 07 October 2008 13:17
|
|
|
Re: FileSel and international files problem when getting icon image
By: mirek on Sun, 19 October 2008 22:48
|
|
|
Re: FileSel and international files problem when getting icon image
By: koldo on Mon, 20 October 2008 09:14
|
|
|
Re: FileSel and international files problem when getting icon image
By: mirek on Mon, 20 October 2008 10:42
|
|
|
Re: FileSel and international files problem when getting icon image
By: koldo on Mon, 20 October 2008 22:49
|
|
|
Re: FileSel and international files problem when getting icon image
By: mirek on Wed, 22 October 2008 23:37
|
|
|
Re: FileSel and international files problem when getting icon image
By: koldo on Tue, 21 October 2008 07:00
|
|
|
Re: FileSel and international files problem when getting icon image
By: mirek on Wed, 22 October 2008 23:39
|
|
|
Re: FileSel and international files problem when getting icon image
By: koldo on Thu, 23 October 2008 00:20
|
|
|
Re: FileSel and international files problem when getting icon image
By: mirek on Thu, 23 October 2008 09:18
|
Goto Forum:
Current Time: Fri Apr 26 10:50:39 CEST 2024
Total time taken to generate the page: 0.05008 seconds
|