BFFM_SETSELECTION does not work with SHBrowseForFolder on Windows 7 - by CSSForumEngineer

Status : 

  External<br /><br />
		This item may be valid but belongs to an external system out of the direct control of this product team.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


10
0
Sign in
to vote
ID 518103 Comments
Status Closed Workarounds
Type Bug Repros 9
Opened 12/4/2009 3:51:51 AM
Access Restriction Public

Description

When using BFFM_SETSELECTION and BIF_NEWDIALOGSTYLE in the code below. In XP and Vista this selects the folder and scrolls the list to make the selected folder visible to the user. However, in Windows 7 the list is not scrolled to show the selected folder.
Sign in to post a comment.
Posted by Karl E Peterson on 4/3/2012 at 9:24 AM
It's hard to believe Microsoft spent any actual effort reviewing this issue, or attempting to reproduce it. It's extremely obvious after just a handful of function calls. (Tends to occur in 5+ random calls out of 10.) It is not restricted to Windows 7 x64, but happens on the 32-bit editions as well. And it happens in both 32- and 64-bit applications. The root is insignificant. This isn't related to development environment. It's a Shell problem, pure and simple, and it was introduced in Windows 7. (Or maybe Vista - who would know? <shrug>) The problem is not present in XP.
Posted by MikeyMS on 12/29/2009 at 7:34 AM
I can confirm this as well. Dialog opens up and the proper folder is selected but the dialog does not automatically scroll so that the selected folder is in view. Key points to reproduce are:

(1) Start with "Desktop" as the root and be sure to select a folder that is sufficiently far down the tree so that it doesn't show up unless scrolled-to.

(2) Must use the BIF_NEWDIALOGSTYLE flag. Without that flag (using the old dialog style), it works.

(3) Must be using Windows 7 x64. Works on other OS's.

Again, the symptom is that the dialog opens with the proper folder selected, but it opens with the top of the tree showing so you may have to scroll down several screens to see the selected folder. The posted example here should be enough to reproduce.

Mike
Posted by Gaute. _ on 12/14/2009 at 12:35 PM
Windows Server 2008 R2 has the same problem.
Posted by Gaute. _ on 12/7/2009 at 8:35 AM
Please try the code shown here - you will be able to reproduce the bug:
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/a22b664e-cb30-44f4-bf77-b7a385de49f3
Posted by Microsoft on 12/4/2009 at 8:47 PM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Posted by Microsoft on 12/4/2009 at 8:47 PM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Posted by Microsoft on 12/4/2009 at 8:46 PM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Posted by Microsoft on 12/4/2009 at 8:46 PM
Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

It may help if you provide us with a mini dump file. You can use the following steps to get a mini dump file:
1. Start Visual Studio.
2. Start another instance of VS.
3. In the second instance click Tools | Attach to Process...
4. In the list of processes locate devenv.exe.
5. Click Select... and explicitly choose 'Native' and 'Managed' code.
6. Click OK and OK to close Select dialog and Attach to Process dialog.
7. Go back to the first instance of VS and repro the crash\hang.
8. Upon the crash\hang, control should go to the second instance of VS.
9. In the second instance click Debug | Save Dump As... and save the mini dump file.

You can get detailed steps about how to get the dump file at http://blogs.msdn.com/kirillosenkov/archive/2008/12/07/how-to-debug-crashes-and-hangs.aspx


It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 7 days, we will close this issue.

Thanks again for your efforts and we look forward to hearing from you.
Visual Studio Product Team
Posted by Microsoft on 12/4/2009 at 7:14 PM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)