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 » U++ Library support » FileSel&FileList, Path » FileSel and international files problem when getting icon image
FileSel and international files problem when getting icon image [message #18542] Tue, 07 October 2008 13:17 Go to previous message
koldo is currently offline  koldo
Messages: 3004
Registered: August 2008
Ultimate Member
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


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: knowing extinsion and name
Next Topic: Problem with FileSel called from menu
Goto Forum:
  


Current Time: Sun Oct 20 18:13:57 CEST 2019

Total time taken to generate the page: 0.01100 seconds