关于SHBrowseForFolder--up也好

scie 2003-10-17 08:21:12
使用用Shell函数ShellBrowseForFolder可以产生选择文件夹对话框,但通常的参数设置没有新建文件夹按钮。有一本书上说可以通过指定BIF_NEWDIALOGSTYLE参数实现,只应用于Shell5.0以后版本,而且必须调用OleInitialize或CoInitialize对COM初始化。
问题是VC6。0中并没有对BIF_NEWDIALOGSTYLE参数的定义,怎么办?
...全文
101 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
蒋晟 2003-10-22
  • 打赏
  • 举报
回复
if u provide a BFFCALLBACK proc,see Working "New Folder" button
http://www.codeguru.com/mfc/comments/2204.shtml
if not, u will get the New Folder button only if the system support it.


Command what is yours
Conquer what is not

http://www.csdn.net/develop/author/netauthor/jiangsheng/
scie 2003-10-22
  • 打赏
  • 举报
回复
谢了,我看看。
wuxfBrave 2003-10-22
  • 打赏
  • 举报
回复
// Browsing for directory.
#define BIF_RETURNONLYFSDIRS 0x0001 // For finding a folder to start document searching
#define BIF_DONTGOBELOWDOMAIN 0x0002 // For starting the Find Computer
#define BIF_STATUSTEXT 0x0004 // Top of the dialog has 2 lines of text for BROWSEINFO.lpszTitle and one line if
// this flag is set. Passing the message BFFM_SETSTATUSTEXTA to the hwnd can set the
// rest of the text. This is not used with BIF_USENEWUI and BROWSEINFO.lpszTitle gets
// all three lines of text.
#define BIF_RETURNFSANCESTORS 0x0008
#define BIF_EDITBOX 0x0010 // Add an editbox to the dialog
#define BIF_VALIDATE 0x0020 // insist on valid result (or CANCEL)

#define BIF_NEWDIALOGSTYLE 0x0040 // Use the new dialog layout with the ability to resize
// Caller needs to call OleInitialize() before using this API

#define BIF_USENEWUI (BIF_NEWDIALOGSTYLE | BIF_EDITBOX)

#define BIF_BROWSEINCLUDEURLS 0x0080 // Allow URLs to be displayed or entered. (Requires BIF_USENEWUI)
#define BIF_UAHINT 0x0100 // Add a UA hint to the dialog, in place of the edit box. May not be combined with BIF_EDITBOX
#define BIF_NONEWFOLDERBUTTON 0x0200 // Do not add the "New Folder" button to the dialog. Only applicable with BIF_NEWDIALOGSTYLE.
#define BIF_NOTRANSLATETARGETS 0x0400 // don't traverse target as shortcut

#define BIF_BROWSEFORCOMPUTER 0x1000 // Browsing for Computers.
#define BIF_BROWSEFORPRINTER 0x2000 // Browsing for Printers
#define BIF_BROWSEINCLUDEFILES 0x4000 // Browsing for Everything
#define BIF_SHAREABLE 0x8000 // sharable resources displayed (remote shares, requires BIF_USENEWUI)


可以到微软站点下载一个新的开发包http://www.microsoft.com/msdownload/platformsdk/sdkupdate
zhourongbiao 2003-10-19
  • 打赏
  • 举报
回复
只能up
ahao 2003-10-19
  • 打赏
  • 举报
回复
去ms下载最新的platform sdk
scie 2003-10-19
  • 打赏
  • 举报
回复
To smch(Ashes Of Time):右键菜单只有帮助选项。
windowslover 2003-10-18
  • 打赏
  • 举报
回复
关注
fanfyj 2003-10-18
  • 打赏
  • 举报
回复
up
smch 2003-10-17
  • 打赏
  • 举报
回复
在出来对话框之后应该可以单击鼠标右键新建文件夹吧。
flyelf 2003-10-17
  • 打赏
  • 举报
回复
up

15,980

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧