Call MSWOnInitDone() when using IFileDialog too

This allows to use the new style dialog for the file dialogs for which
Centre() or SetSize() had been called, as we can now position the window
even when not using a hook function.

As there is no IFileDialogEvents function corresponding to CDN_INITDONE
notification, use the first call to OnTypeChange() instead.
This commit is contained in:
Vadim Zeitlin
2022-05-25 19:11:35 +01:00
parent 1de1c62872
commit 63f44b5bfa
3 changed files with 28 additions and 5 deletions

View File

@@ -1741,6 +1741,8 @@ void MyFrame::FilesOpen(wxCommandEvent& WXUNUSED(event) )
wxEmptyString, wxEmptyString, wildcards,
wxFD_OPEN|wxFD_MULTIPLE);
dialog.Centre(wxCENTER_ON_SCREEN);
if (dialog.ShowModal() == wxID_OK)
{
wxArrayString paths, filenames;