[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.
This commit is contained in:
Thiago Mucci
2026-07-22 00:12:40 +02:00
committed by GitHub
parent 7090cf7ebc
commit 19f3949290
+6
View File
@@ -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)