Problem with Browse for Folder
Problem with Browse for Folder
I don't remember where I got this from - but I am grateful for it.
However, I face difficulty with it not selecting the Initial folder.
Where am I going wrong?
However, I face difficulty with it not selecting the Initial folder.
Where am I going wrong?
You do not have the required permissions to view the files attached to this post.
-
- Founder/Site Admin
- Posts: 2957
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: Problem with Browse for Folder
I think this comes from SalExtension.
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.
See
BFFCALLBACK function pointer
The only way in TD to add support for callbacks is using the Callback library:
Callback archive
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.
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.
See
BFFCALLBACK function pointer
The only way in TD to add support for callbacks is using the Callback library:
Callback archive
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.
Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Re: Problem with Browse for Folder
Thanks! Let me try.
Re: Problem with Browse for Folder
Hello Dave,Dave Rabelink wrote: ↑04 Jan 2020, 11:39
The only way in TD to add support for callbacks is using the Callback library:
Callback archive
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.
a thousand thanks for all your work on these callback libraries.
I've been using them since 6.3 and I'm so glad to have them.
Since moving to TD7.3 I learned that Callback DLL 7.2 doesn't work. When Browsing for Folder, the app just crashes.
You mentioned, that you're working on a new callback dll already.
Any idea when it will arrive? It would be so great to have it back again.
best regards
Ulf
Re: Problem with Browse for Folder
I'm also interested in the new callback dll. Is there any status on this?
-
- Founder/Site Admin
- Posts: 2957
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: Problem with Browse for Folder
Sorry for my late reply.
The overhaul of Callback is not yet finished. Need some spare time on that...
But in the meantime I have uploaded a TD73 version, based on the old code which can be used.
https://samples.tdcommunity.net/index.p ... rch_mode=f
The overhaul of Callback is not yet finished. Need some spare time on that...
But in the meantime I have uploaded a TD73 version, based on the old code which can be used.
https://samples.tdcommunity.net/index.p ... rch_mode=f
Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Re: Problem with Browse for Folder
Hello Dave,
thank you so much for providing this file.
For my developpiing skills are quite low level I depend on generous people like you, who share their valuable knowledge.
To take my share for your efforts I would be prepared for a donation to honor your work.
Do you have a donation button somewhere?
Did I understand right that the upcoming version will be independent from the TD version?
Again, thank you. It work perfectly, like always.
br
Dobby
thank you so much for providing this file.
For my developpiing skills are quite low level I depend on generous people like you, who share their valuable knowledge.
To take my share for your efforts I would be prepared for a donation to honor your work.
Do you have a donation button somewhere?
Did I understand right that the upcoming version will be independent from the TD version?
Again, thank you. It work perfectly, like always.

br
Dobby
-
- Founder/Site Admin
- Posts: 2957
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: Problem with Browse for Folder
Yes. So there will be just one dll which will work in any TD version, even the future ones.
This resolves the hassle having to build a new version when a new TD version is released.
Nice!To take my share for your efforts I would be prepared for a donation to honor your work.
Do you have a donation button somewhere?
Well, yes. There is a donate button on the side-bar of the TD Wiki main page:
https://wiki.tdcommunity.net/index.php/Main_Page
Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Re: Problem with Browse for Folder
Thank you SO much. It works like a champ.
Who is online
Users browsing this forum: [Ccbot] and 0 guests