From 720148e6d03e97058649203e4229e05f29134898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 15 Sep 2024 21:18:38 +0200 Subject: [PATCH] [RAPPS] Forbid the "Install" tree-view section to collapse in APPWIZ mode (#6655) However, there is currently a bug in Wine's comctl32, which ignores the value returned from the TVN_ITEMEXPANDING notification handler to control the collapse/expansion behaviour. https://bugs.winehq.org/show_bug.cgi?id=53727 As a result, this feature doesn't work in ReactOS yet. --- base/applications/rapps/gui.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/base/applications/rapps/gui.cpp b/base/applications/rapps/gui.cpp index a02055310ab8e..d8f25d2591715 100644 --- a/base/applications/rapps/gui.cpp +++ b/base/applications/rapps/gui.cpp @@ -347,6 +347,22 @@ CMainWindow::ProcessWindowMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lPa switch (data->code) { + case TVN_ITEMEXPANDING: + { + if (data->hwndFrom == m_TreeView->m_hWnd) + { + // APPWIZ-mode: forbid item collapse. + // FIXME: Prevent collapse (COMCTL32 is buggy) + // https://bugs.winehq.org/show_bug.cgi?id=53727 + if (m_bAppwizMode && (((LPNMTREEVIEW)lParam)->action & TVE_TOGGLE) == TVE_COLLAPSE) + { + theResult = TRUE; + return TRUE; // Handled + } + } + break; + } + case TVN_SELCHANGED: { if (data->hwndFrom == m_TreeView->m_hWnd)