Solved

SHBrowseForFolder and shortcuts

Posted on 2003-10-28
1
324 Views
Last Modified: 2013-12-03
Hi!
I am using SHBrowseForFolder inside of an MFC application in order to browse for folders.  However, it is not displaying shortcuts to folders.  I am assuming this is because shortcuts to folders are .lnk files and it is only displaying folders.  Does anyone have any idea how to display shortcuts to folders without displaying all files?
Thanks!
Christie
0
Comment
Question by:muellerfan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 48

Accepted Solution

by:
AlexFM earned 200 total points
ID: 9639636
I think you need to use some Browse for Folder dialog which allows to show also files, for example, this:

http://www.codeguru.com/dialog/DirSelDlg.html

Instead of showing of all files in directory, scan only .lnk files and resolve shortcut. If it points to directory, add directory name to the list. To resolve shortcut you can use this sample:

http://www.codeproject.com/shell/cshelllink.asp

According to this article, you need to use CShellLink::Load and CShellLinkInfo::m_sTarget to get shortcut tatget. Use GetFileAttributes to check whether target is directory.


0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question