I have ported a C++Builder 6 application to compile with C++Builder 11.
One issue I have found in testing is that the TOpenDialog behaves differently between the two versions.
The C++Builder 6 version changes the current directory when Open is clicked while the C++Builder 11 version leaves the current directory unchanged.
I have tried setting the OpenDialog Options to ensure that they do not include ofNoChangeDir but this makes no difference.
Both C++Builder 6 and 11 versions are running on Windows 10.
I would like to make the C++Builder 11 version change the current directory on Open so that everything downstream will work in the same way, but so far through clearing and setting options I have had no luck.
I could just change the current directory after OpenDialog->Execute() returns but this seems a bit cludgy when there are Options that should dictate the dialog behavior.
// Check the current directory before and after the OpenDialog executes ...
String CurrentDirectory = GetCurrentDir();
OpenDialog1->Options.Clear();
OpenDialog1->Options << ofHideReadOnly << ofEnableSizing; // seems to be the default
if (OpenDialog1->Execute())
{
// do whatever
}
CurrentDirectory = GetCurrentDir(); // no change!? :|