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)