是否可以从其他进程覆盖CFileDialog初始路径? [英] Is it possible to override CFileDialog initial path from other process?

查看:68
本文介绍了是否可以从其他进程覆盖CFileDialog初始路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以覆盖CFileDialog(类名#32770) 其他过程的初始路径?

Is it possible to override CFileDialog (class name #32770)  initial path from other process?

例如sendmessage,DLL注入,或者可能由OpenFileDialog覆盖

such as sendmessage, DLL injection, or maybe overriding by OpenFileDialog

推荐答案

我建议你逐步完成CFileDialog的MFC源代码。 设置初始路径是在实际创建对话窗口的DoModal()调用之前完成的。 假设您正在使用CFileDialog默认构造函数,您可以
在对象的OPENFILENAME结构中设置路径或使用基础的IFileOpenDialog shell接口。 无论哪种方式,设置都会在创建实际对话窗口之前发生。

I suggest you step through the MFC source code for CFileDialog.  Setting the initial path is done before the DoModal() call that actually creates the dialog window.  Assuming that you are using the CFileDialog default constructor you can either set the path in the object's OPENFILENAME structure or use the underlying IFileOpenDialog shell interface.  Either way, the setting happens before the actual dialog window is created.

我不能确定它是不可能的,但如果可以的话完成它不会是一项微不足道的任务。

I can't say for sure that it's not possible, but if it can be done it won't be a trivial undertaking.


这篇关于是否可以从其他进程覆盖CFileDialog初始路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆