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.
This commit is contained in:
Vadim Zeitlin
2022-05-28 19:06:35 +01:00
parent ae16657426
commit 96bcd545a9

View File

@@ -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;