Default dir for wxFileDialog

22 views
Skip to first unread message

Сергей Коныгин

unread,
Jan 18, 2026, 1:32:14 PMJan 18
to wx-users
Hi!
My application has many dialog boxes for selecting files. I need each window to start from its last opened folder.  Despite all my efforts, I was never able to achieve stable operation. Basically, it turns out that the last folder is common to all dialog boxes. It seems that the window ignores the defaultDir parameter.
How can I set the starting directory correctly before running wxFileDilaog?

Vadim Zeitlin

unread,
Jan 22, 2026, 10:13:17 AM (14 days ago) Jan 22
to wx-u...@googlegroups.com
I didn't do exhaustive testing across all Windows versions, but I think
that it has decided to take over the initial directory already several
versions ago (i.e. maybe as far back as in Vista).

IOW I'm afraid there is nothing we can do to actually use the directory we
provide when using the native dialog, it just ignores it and does its own
thing.

I would, of course, be happy to be proven wrong, so if anybody knows of a
way to do what we need, please let me know or, better yet, submit a PR
implementing it.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
https://www.tt-solutions.com/
Reply all
Reply to author
Forward
0 new messages