From: Ezra B. <ezr...@us...> - 2009-04-10 16:24:47
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15200/src/lib Modified Files: FolderView.f Log Message: IDE Enhancements. Bug Fixes. Doc Updates. Index: FolderView.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/FolderView.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FolderView.f 24 Aug 2008 04:06:56 -0000 1.2 --- FolderView.f 10 Apr 2009 16:24:33 -0000 1.3 *************** *** 5,9 **** needs linklist.f needs listview.f ! needs apps\forthform\quiksort.f \- ?exitm macro ?exitm " if exitm then" --- 5,9 ---- needs linklist.f needs listview.f ! needs quiksort.f \- ?exitm macro ?exitm " if exitm then" *************** *** 71,74 **** --- 71,103 ---- \ #ENDIF + INTERNAL + EXTERNAL + : BrowseFolder ( lpszTitle pszFolder hwndOwner -- flag ) + + hwndOwner ! + swap lpszTitle ! + + \ if we have a valid Folder, than we need a callback for + \ SHBrowseForFolder() to set the startup-folder in the dialog + dup +null 1+ dup call PathIsDirectory + if &BrowseCallbackProc else 0 then lpfn ! + + dup dup pszDisplayName ! + + [ BIF_RETURNONLYFSDIRS BIF_EDITBOX or BIF_VALIDATE or BIF_NEWDIALOGSTYLE or ] literal ulFlags ! + + 0 pidlRoot ! + 0 lParam ! + + \ OleInitialize() must be called if BIF_NEWDIALOGSTYLE flag is set + 0 call OleInitialize drop + + BROWSEINFO call SHBrowseForFolder dup>r + call SHGetPathFromIDList + if zcount swap 1- c! true + else drop false + then r> Call CoTaskMemFree drop ; \ release memory + MODULE + :Class FindFile <Super Object *************** *** 680,684 **** \ use a copy of path because if cancelled path info is changed to null GetPath: self pad place ! pad hwnd BrowseForFolder if pad count Update: Self then ;M --- 709,713 ---- \ use a copy of path because if cancelled path info is changed to null GetPath: self pad place ! pad hwnd BrowseFolder if pad count Update: Self then ;M |