VC文件夹浏览问题-SHBrowseForFolder函数问题
请教下各位了 小弟今天发现SHBrowseForFolder这个函数在win7系统下(编辑器VC8.0) 返回值为空了!而在XP上却能成功返回值,实在费解!谁给指点下吧,先跪谢了! VC++? SHBrowseForFolder VC Windows?7
[解决办法]
好像确实是有这个bug
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/a22b664e-cb30-44f4-bf77-b7a385de49f3/
[解决办法]
这个问题在我电脑上也重现了,我现在是Win7 x86 sp1,但从我用WIN7 Beta开始一直有这个问题。看您的ID应该是个中国人,我英语不好,所以直接打中文了。
如楼上所说,ulFlags需要用BIF_USENEWUI才会有这个问题,传统风格对话框不会】】
-------------
Yes, there's a workaround, although it's not perfect. I found it, with the help of a good friend, yesterday. The only 100% solution I've found so far is to send a TVM_ENSUREVISIBLE to the tree, using TVM_GETNEXTITEM/TVGN_CARET, from BFFM_SELCHANGED. That works. Every time. On those random occasions when the pre-selected item isn't initially visible, there is the apparent scrolling after the dialog displays.