mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +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;
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue