mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user