From 19f3949290774facaab8b63f3293e0cff7d64ed0 Mon Sep 17 00:00:00 2001 From: Thiago Mucci Date: Tue, 21 Jul 2026 18:12:40 -0400 Subject: [PATCH] [MSCONFIG] Disable tree view label editing (#9302) CORE-20447 Remove the `TVS_EDITLABELS` window style from the tree view control of the `SYSTEM.INI`/`WIN.INI` tabs, making the labels read-only as intended. This prevents the UI from opening an editable text box when users click or pause on tree view items, which was misleading since editing/saving here is not implemented. Users are still able to edit configurations using the dedicated "Edit" button on the UI. --- base/applications/msconfig/msconfig.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/applications/msconfig/msconfig.c b/base/applications/msconfig/msconfig.c index 2372d82d7e7..f5067fe6f80 100644 --- a/base/applications/msconfig/msconfig.c +++ b/base/applications/msconfig/msconfig.c @@ -86,6 +86,12 @@ VOID DisableAllExcept(HWND hTabDlg, UINT idExcept) HWND hSkip = GetDlgItem(hTabDlg, idExcept); for (HWND hWnd = NULL; (hWnd = FindWindowExW(hTabDlg, hWnd, NULL, NULL)) != NULL;) EnableWindow(hWnd, hWnd == hSkip); + if (idExcept == IDC_SYSTEM_TREE && hSkip) + { + LONG_PTR style = GetWindowLongPtrW(hSkip, GWL_STYLE); + style &= ~TVS_EDITLABELS; + SetWindowLongPtrW(hSkip, GWL_STYLE, style); + } } BOOL OnCreate(HWND hWnd)