Re: Default dir for wxFileDialog
Vadim Zeitlin <[email protected]> Thu, 22 Jan 2026 16:13:09 +0100
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 18 Jan 2026 10:32:13 -0800 (PST) Сергей Коныгин wrote:
> 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?
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/
signature.asc
(application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQx+vLQdOwioQqkxtoG6kHeT2wehgUCaXI+hQAKCRAG6kHeT2we hophAKCSLl/71ntFjFz4zIr8gjssfyPJtgCfSXUk5j34Yx2NzboLD/gyGitJdqY= =Bjp6 -----END PGP SIGNATURE-----