From 96bcd545a90dc251ad3b3287c866e68504bf7adb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 28 May 2022 19:06:35 +0100 Subject: [PATCH] Support wxFileDialogCustomize when not using IFileDialog in wxMSW This should be rarely needed, but it doesn't cost anything to support the new customization API if IFileDialog is not available at either compile- or run-time, as this just reuses the existing generic implementation. --- src/msw/filedlg.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index 3f29a50584..f5660d9934 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -1022,7 +1022,9 @@ int wxFileDialog::ShowCommFileDialog(WXHWND hWndParent) in the upper left of the frame, it does not center automatically. */ - if ((m_data && m_data->m_bMovedWindow) || HasExtraControlCreator()) // we need these flags. + if ((m_data && m_data->m_bMovedWindow) || + HasExtraControlCreator() || + m_customizeHook) { ChangeExceptionPolicy(); msw_flags |= OFN_EXPLORER|OFN_ENABLEHOOK; @@ -1060,7 +1062,7 @@ int wxFileDialog::ShowCommFileDialog(WXHWND hWndParent) of.nMaxFileTitle = wxMAXFILE + 1 + wxMAXEXT; GlobalPtr hgbl; - if ( HasExtraControlCreator() ) + if ( HasExtraControlCreator() || m_customizeHook ) { msw_flags |= OFN_ENABLETEMPLATEHANDLE;