Skip to content

Commit

Permalink
[SHELL32] Improve file properties dialog (reactos#5852)
Browse files Browse the repository at this point in the history
Based on KRosUser's patches.
- Add missing version strings "Comments" and
  "LegalTrademarks".
- Add version strings "PrivateBuild" and
  "SpecialBuild" if necessary.
- Trim the version string for pretty display.
CORE-19270, CORE-19114, CORE-19275
  • Loading branch information
katahiromz authored Oct 30, 2023
1 parent 87f94aa commit 00f192f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions dll/win32/shell32/dialogs/filedefext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,14 @@ CFileDefExt::InitVersionPage(HWND hwndDlg)
AddVersionString(hwndDlg, L"OriginalFilename");
AddVersionString(hwndDlg, L"FileVersion");
AddVersionString(hwndDlg, L"ProductVersion");
AddVersionString(hwndDlg, L"Comments");
AddVersionString(hwndDlg, L"LegalTrademarks");

if (pInfo && (pInfo->dwFileFlags & VS_FF_PRIVATEBUILD))
AddVersionString(hwndDlg, L"PrivateBuild");

if (pInfo && (pInfo->dwFileFlags & VS_FF_SPECIALBUILD))
AddVersionString(hwndDlg, L"SpecialBuild");

/* Attach file version to dialog window */
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)this);
Expand Down Expand Up @@ -957,8 +965,11 @@ CFileDefExt::VersionPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
if (pwszData == NULL)
break;

TRACE("hDlgCtrl %x string %s\n", hDlgCtrl, debugstr_w(pwszData));
SetDlgItemTextW(hwndDlg, 14010, pwszData);
CString str(pwszData);
str.Trim();

TRACE("hDlgCtrl %x string %s\n", hDlgCtrl, debugstr_w(str));
SetDlgItemTextW(hwndDlg, 14010, str);

return TRUE;
}
Expand Down

0 comments on commit 00f192f

Please sign in to comment.