我在这里的示例项目工作:http: //www.codeproject.com/Articles/8086/Extending-the-save-file-dialog-class-in-NET
我隐藏了顶部的地址/位置栏并进行了其他修改,但我无法终生禁用让您转到父文件夹的按钮。Ist 在 ToolbarWindow32 类中,这是问题所在。这是我目前所拥有的,但它不起作用:
int parentFolderWindow = GetDlgItem(parent, 0x440);
//Doesn't work
//ShowWindow((IntPtr)parentFolderWindow, SW_HIDE);
//40961 gathered from Spy++ watching messages when clicking on the control
// doesn't work
//SendMessage(parentFolderWindow, TB_ENABLEBUTTON, 40961, 0);
// doesn't work
//SendMessage(parentFolderWindow, TB_SETSTATE, 40961, 0);
//Comes back as '{static}', am I working with the wrong control maybe?
GetClassName((IntPtr)parentFolderWindow, lpClassName, (int)nLength);
或者,如果他们确实使用父文件夹按钮并去我不希望他们去的地方,我可以查看他们所在的新目录,有没有办法可以强制导航返回?
编辑:添加截图