Solved

SHBrowseForFolder and shortcuts

Posted on 2003-10-28
1
320 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Problem updating Access table using VB code 8 59
Winform not working on 64 bit machine 31 105
VIDEO DATASOURCE Control Resize issue 2 62
Input parameteres to DragOver 2 58
This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

737 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