-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use NFD_OpenDialog(, , , default_path) #132
Comments
It took some time to work this out. How to get around A. if you have already provided a previous path to the application and is now stored in the registry and you wish to test a new default path?
Caution! Deleting or changing registry entries comes with risks. Retest your app with your new default fully qualified path to confirm that the file dialog opens in the correct directory. Important! Restore your exported backup of as soon as you have finished your tests: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32*.* imediataly. Axle |
Thanks for thoroughly testing it. Yes, that is the correct behaviour of About relative paths - I don't think anything in NFD explicitly disables that, so it probably depends on how Windows implements it. Note that any relative path, if supported, will be relative to the current working directory, and not the directory in which your executable is located. |
Thanks btzy I had previously used the Allegro native file dialogs addon which always starts in the selected default directory regardless of last selected, so it threw me off. I had forgotten about and wasn't clear on the Windows default behavior :) I am just looking at using a win/nix implementation of getcwd,_getcwd or realpath or gpakosz/whereami to feed as the default on first start, or ultimately just let it NULL to the user home directory. Attempting to avoid too much library overhead for a once off that is only ever used the first time the app is run. Best regards |
Hi all
I can't seam to get the NFD_OpenDialog() default path to work. I have checked all of the examples and all are set to NULL.
Windows 10 64-bit GCC MinGWw64.
I have attempted relative paths ".\" "..\" "\xxx" as well as full paths Z:\appdir\xxx
Example:
How do I do this?
Best regards
Axle
The text was updated successfully, but these errors were encountered: