Problem with Browse for Folder

Post your tools and samples or ask for them.
FRBhote
India
Posts: 2215
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Problem with Browse for Folder

Post by FRBhote » 04 Jan 2020, 07:43

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?
You do not have the required permissions to view the files attached to this post.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 2913
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Problem with Browse for Folder

Post by Dave Rabelink » 04 Jan 2020, 11:39

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.
Regards,
Dave Rabelink

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

FRBhote
India
Posts: 2215
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Problem with Browse for Folder

Post by FRBhote » 06 Jan 2020, 05:06

Thanks! Let me try.

Dobby
Germany
Posts: 5
Joined: 24 Apr 2017, 11:52
Location: Salem Germany

Re: Problem with Browse for Folder

Post by Dobby » 27 Mar 2020, 18:46

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.
Hello Dave,

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

guythompson2
United States of America
Posts: 2
Joined: 19 Mar 2018, 16:42
Location: Memphis, USA

Re: Problem with Browse for Folder

Post by guythompson2 » 03 Aug 2020, 15:23

I'm also interested in the new callback dll. Is there any status on this?

Return to “Tools & Samples”

Who is online

Users browsing this forum: [Ccbot] and 0 guests