Any workaround?
#include "Fivewin.ch"
FUNCTION MAIN()
CGETFILE( "All files (*.*)|*.*", "Select a file", , CURDRIVE() + ":\" + CURDIR() )
RETURN NILEMG
#include "Fivewin.ch"
FUNCTION MAIN()
CGETFILE( "All files (*.*)|*.*", "Select a file", , CURDRIVE() + ":\" + CURDIR() )
RETURN NILRestores the current directory to its original value if the user changed the directory while searching for files.
This flag is ineffective for GetOpenFileName
Most likely.
EMG
Is there any fix for this? I want a certain default directory but I can't rely on it.
I created an Outlook signature program and I expect it to default to the correct user profile area. If user changes drive/folder then the next time the user cannot updated or add signature correctly.
Try telling user to change c:\Users+[ProfileName]+\AppData\Roaming\Microsoft\Signatures\ if Windows 7 or c:\Users+[ProfileName]+\Application Data\Microsoft\Signatures\ if Windows 8/10.
Restores the current directory to its original value if the user changed the directory while searching for files.
This flag is ineffective for GetOpenFileName.
A possible solution is to save the current directory using GetCurDir() before calling cGetFile() and restore it later using SetCurDir()
This would not solve the problem. cGetFile() would continue to show the changed directory. Is not the current directory of the application that changes, is the directory shown by cGetFile().
Anyway, I just tried your suggestion and it doesn't work.
EMG
I saw the solution googling for info about it but I had not tried it, so many thanks Enrico for your feedback
Stackoverflow seems the right way to look into for a possible solution