Hi,
I am using C++Builder in RAD Studio 10.1 Berlin Update 1 and LMD-Tools 2016.6.
In Windows 10, if I run the code below which loads "C:\\MyFolder\\" into the LMDBrowseDlg1->SelectedFolder. Then when I run the dialog with LMDBrowseDlg1->Execute(), the initial folder in the dialog is not C:\MyFolder but incorrectly the Desktop.
In contrast, if I run this code in Windows 7, it works fine and the LMDBrowseDlg1 initially correctly goes to C:\MyFolder.
Furthermore, in older code compiled with BDS2006 and LMD-Tools 7.12, similar code ran fine in Windows 7 and Windows XP going correctly to C:\MyFolder, but had the same problem in Windows 10 of going incorrectly to the Desktop.
Could you please tell me what I am doing wrong.
TLMDBrowseDlg *LMDBrowseDlg1;
ChangeFolder_LMDBrowseDlg(void)
{
UnicodeString usSelectedFolder;
LMDBrowseDlg1->SelectedFolder = "C:\\MyFolder\\"; // SelectedFolder has "C:\\MyFolder\\"
if( LMDBrowseDlg1->Execute() )
{
// LMDBrowseDlg1 will go to Desktop, and will return "C:\\Users\\Neil\\Desktop" in the LMDBrowseDlg1->SelectedFolder
usSelectedFolder = LMDBrowseDlg1->SelectedFolder; // usSelectedFolder has "C:\\Users\\Neil\\Desktop"
}
}
Comments