Author: janderwald
Date: Fri Jun 27 04:18:43 2008
New Revision: 34126
URL:
http://svn.reactos.org/svn/reactos?rev=34126&view=rev
Log:
- use "FriendlyTypeName" key for file types when available
- allows to show translated file types in file property dialog
Modified:
trunk/reactos/dll/win32/shell32/fprop.c
Modified: trunk/reactos/dll/win32/shell32/fprop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/fprop.c?…
==============================================================================
--- trunk/reactos/dll/win32/shell32/fprop.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/fprop.c [iso-8859-1] Fri Jun 27 04:18:43 2008
@@ -148,12 +148,16 @@
return FALSE;
if (RegOpenKeyW(HKEY_CLASSES_ROOT, value, &hKey) == ERROR_SUCCESS)
{
- lvalue = lname = MAX_PATH;
- result = RegEnumValueW(hKey,0, name, &lname, NULL, NULL, (LPBYTE)value,
&lvalue);
+ if (RegLoadMUIStringW(hKey, L"FriendlyTypeName", value, MAX_PATH, NULL,
0, NULL) != ERROR_SUCCESS)
+ {
+ lvalue = lname = MAX_PATH;
+ result = RegEnumValueW(hKey,0, name, &lname, NULL, NULL, (LPBYTE)value,
&lvalue);
+ }
RegCloseKey(hKey);
}
/* file extension type */
+ value[MAX_PATH-1] = L'\0';
SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)value);
return TRUE;
}