However, I face difficulty with it not selecting the Initial folder.
Where am I going wrong?
- Founder/Site Admin
- Posts: 2837
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Well, out of the box in TD, the feature to preselect a folder in the SHBrowseForFolder dialog is not supported.
This is because the API SHBrowseForFolder function implements a callback functionality to get the folder to be preselected.
And callbacks are not possible in TD without extra help.
BFFCALLBACK function pointer
The only way in TD to add support for callbacks is using the Callback library:
I'm using callback for most of my projects because I need those Windows API's.
This feature should in fact be part of the TD runtime by default in my opinion. A few libraries should be part of any project out-of-the-box. I name here: mtable, callback and subclasser.
It just happens that I'm currently busy changing the callback library so it does not need to be rebuild for each TD version separately.
When I'm finished with that and release it I will create a sample and post it here to be used with SHBrowseForFolder.
You could also use the sample provided in the old callback archive (callback2006.zip, callback2007.zip) which shows how to implement SHBrowseForFolder.
Who is online
Users browsing this forum: [Ccbot] and 0 guests