mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
- use "FriendlyTypeName" key for file types when available
- allows to show translated file types in file property dialog svn path=/trunk/; revision=34126
This commit is contained in:
parent
bf27f86d38
commit
f3b1615f45
1 changed files with 6 additions and 2 deletions
|
@ -148,12 +148,16 @@ SH_FileGeneralSetFileType(HWND hwndDlg, WCHAR * filext)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (RegOpenKeyW(HKEY_CLASSES_ROOT, value, &hKey) == ERROR_SUCCESS)
|
if (RegOpenKeyW(HKEY_CLASSES_ROOT, value, &hKey) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
lvalue = lname = MAX_PATH;
|
if (RegLoadMUIStringW(hKey, L"FriendlyTypeName", value, MAX_PATH, NULL, 0, NULL) != ERROR_SUCCESS)
|
||||||
result = RegEnumValueW(hKey,0, name, &lname, NULL, NULL, (LPBYTE)value, &lvalue);
|
{
|
||||||
|
lvalue = lname = MAX_PATH;
|
||||||
|
result = RegEnumValueW(hKey,0, name, &lname, NULL, NULL, (LPBYTE)value, &lvalue);
|
||||||
|
}
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* file extension type */
|
/* file extension type */
|
||||||
|
value[MAX_PATH-1] = L'\0';
|
||||||
SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)value);
|
SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)value);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue