September 25, 2022, 11:50:23 PM


IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!

Browse for Folder Custom type - almost there

Started by Guilect, May 17, 2010, 07:17:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.



The Browse for Folder Dialog code can be found here in the forum and has been done by a few people.
But, the way they all work is that they bring up the standard BFF dialog window.
The code I have ported to IWB does not use the standard dialog window.
It places the browse window into your own dialog.
So you can incorporate it into your own program directly or
make a highly customized version of the BFF dialog.

The code works as I had intended it to for a modal BFF window.
However, it would be great to get it to work 'non-blocking'
Perhaps someone can figure out how to get the messagebox in the code to
appear right after the BFF control is created in the dialog window.


Without creating a set of classes for ShellView, you can move the dialog to a separate thread, to make it nonblocking. Just replace the call to FolderRequest with CreateThread, and the FolderRequest put into thread subroutine:
int ThreadId
DECLARE IMPORT, CreateThread(pointer security,int stack,int function,pointer parameter,int flags,lpThreadId AS POINTER),INT

MESSAGEBOX 0, dir, "", 0
WAITUNTIL done = true


sub ThreadProc(pointer parameter)
FolderRequest(0, "get folder", dir, GetStartPath, 0x441)


Works like a champ now.
I have never really worked with threads.
Thanks sapero.