Home
Tutorials
Code Snippets
Code Samples
Downloads
Links

The Blog
Our Projects
About
Contact

::Add RageStorm to Favorites!::

The Blog | Our Projects | Guest Book | About | Contact

 
Code Snippet - Folder Dialog
Author:Arkon
Category:Win32API
File Size:500 Bytes
Uploaded at:27-Nov-02 08:23:51 pm
Description:
  Calling up the folder dialog...
  
bool BrowseFolder(char *strFolderName)
{
 ITEMIDLIST* iIDl;
 strFolderName[0] = '\0';
 BROWSEINFO lpbi = {/*AfxGetMainWnd()->m_hWnd*/NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL};
 iIDl = SHBrowseForFolder(&lpbi);
 SHGetPathFromIDList(iIDl, strFolderName);
 if (strFolderName == NULL) return(0);
 return(1);
}

// Example:

char windowsfolder[MAX_PATH];
if (browsefolder(windowsfolder))
{
 // Folder was selected.
}
else
{
 // User closed the dialog or something wrong happened.
}
NOTE:
Comments that will hurt anyone in any way will be deleted.
Don't ask for features, advertise or curse.
If you want to leave a message to the author use the contacts,
if you have any question in relation to your comments please use the forum.
Comments which violate any of these requests will be deleted without further
notice. Use the comment system decently.

Post your comment:
Name:
email:
Comment:
::Top 5 Tutorials::
Embedded Python[116342]
2D Rotated Rectangles Collision Detection[88469]
Keyboard Hook[76724]
UDP[65659]
HTTP Proxy[41049]

::Top 5 Samples::
2D ColDet Rotated Rectangles[11531]
PS2 Mouse Driver[6928]
Wave Format Player[5764]
Reading FAT12[5591]
CodeGuru[5327]


All rights reserved to RageStorm © 2009