` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Pick a directory using 32 bit API calls
1998-01-09 -- Jeff Berlinghoff
 
CW4 has this built in, but I needed to be able to do this in CW2. It was easier than I expected. Global Embed, After Global Includes: BROWSEINFO GROUP,TYPE hWndOwner LONG pIDLRoot LONG lpszDisplayName LONG lpszTitle LONG ulFlags LONG lpfnCallBack LONG iImage LONG END Global Embed, Inside Global Map: MODULE('Shell32') SHBrowseForFolder(*BrowseInfo),LONG,RAW,PASCAL SHGetPathFromIDList(Long,*CSTRING),LONG,RAW,PASCAL CoTaskMemFree(*LONG),RAW,PASCAL END Procedure, Embed, Data BI LIKE(BrowseInfo) cTitle CSTRING(30) cPath CSTRING(251) In the Code (BE SURE YOU HAVE A WINDOW OPEN!) cTitle = 'List Title Message' cPath = '<0>{250}' BI.hWndOwner = 0{prop:Handle} BI.lpszTitle = ADDRESS(cTitle) BI.ulFlags = 1 !only show directories! lpIDList# = SHBrowseForFolder(BI) IF lpIDList# Result# = SHGetPathFromIDList(lpIDList#, cPath) COTaskMemFree(lpIDList#) MESSAGE(cPath, 'You Chose') END


Today is November 23, 2024, 3:28 am
This article has been viewed 35240 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: