关于VC操作Office屏蔽掉“服务器正在运行中”要选择“切换到...”或"重试"的对话框
来源:互联网 发布:macbook必备软件 知乎 编辑:程序博客网 时间:2024/04/28 07:57
AfxOleGetMessageFilter()->SetBusyReply(SERVERCALL_RETRYLATER);
AfxOleGetMessageFilter()->EnableNotRespondingDialog(TRUE);
AfxOleGetMessageFilter()->SetMessagePendingDelay(-1);
注意:在加入上面代码的源文件的顶部包含头文件:#include <afxole.h>
Base Class Members
CObject Members
CCmdTarget Members
COleMessageFilter
Constructs a COleMessageFilter object.
BeginBusyState
Puts the application in the busy state.
EnableBusyDialog
Enables and disables the dialog box that appears when a called application is busy.
EnableNotRespondingDialog
Enables and disables the dialog box that appears when a called application is not responding.
EndBusyState
Terminates the application's busy state.
Register
Registers the message filter with the OLE system DLLs.
Revoke
Revokes the message filter's registration with the OLE system DLLs.
SetBusyReply
Determines the busy application's reply to an OLE call.
SetMessagePendingDelay
Determines how long the application waits for a response to an OLE call.
SetRetryReply
Determines the calling application's reply to a busy application.
OnMessagePending
Called by the framework to process messages while an OLE call is in progress.
Concepts
如何防止冗长 COM 操作期间出现 OLE 服务器忙对话框,参考:http://support.microsoft.com/kb/248019
概要
更多信息
AfxOleGetMessageFilter()->SetMessagePendingDelay(nTimeout);将传出 COM 调用上设置等待时间。 如果 COM 调用时间长于 nTimeout 毫秒, 然后 MFC 客户应用程序显示 OLE 服务器忙 对话框。 使用,
AfxOleGetMessageFilter()->EnableNotRespondingDialog(FALSE);要禁用 未响应 对话框, 显示如果键盘或鼠标消息是挂起期间 OLE 调用和调用已超。 使用
AfxOleGetMessageFilter()->EnableBusyDialog(FALSE);要禁用忙 @ 对话框中显示 COM 调用后超时。 另一种以取消服务器忙对话框中为代替 AfxOleInit 使用 OleInitialize 和 OleUninitialize 应用程序中。
参考
这篇文章中的信息适用于:
•Microsoft Foundation Class Library 4.2 当用于 Microsoft Visual C++ 5.0 Enterprise Edition Microsoft Visual C++ 6.0 Enterprise Edition Microsoft Visual C++ .NET 2002 Standard Edition Microsoft Visual C++ .NET 2003 Standard Edition- 关于VC操作Office屏蔽掉“服务器正在运行中”要选择“切换到...”或"重试"的对话框
- 关于VC操作Office屏蔽掉“服务器正在运行中”要选择“切换到...”或"重试"的对话框
- 关于VC操作Office屏蔽掉“服务器正在运行中”要选择“切换到...”或"重试"的对话框
- 关于VC操作Office屏蔽掉“服务器正在运行中”要选择“切换到...”或"重试"的对话框
- vc office 屏蔽掉“服务器正在运行中”“切换到”提示框
- 服务器运行中,切换或重试问题
- 屏蔽“服务器正在运行”对话框
- VC 操作Word, Excel 出现"服务器正在运行中" Ole Server Busy对话框的原因分析和解决建议
- 【服务器正在运行中】以及【切换到】等错误问题的解决
- Linux中如何让进程(或正在运行的程序)到后台运行?
- Linux中如何让进程(或正在运行的程序)到后台运行?
- Linux中如何让进程(或正在运行的程序)到后台运行?
- Linux中如何让进程(或正在运行的程序)到后台运行
- Linux中如何让进程(或正在运行的程序)到后台运行?
- Linux中让进程(或正在运行的程序)到后台运行
- VC MFC中关于非模态对话框的操作
- VC中对office的操作
- 屏蔽VC对话框中点击FLASH弹出的右键菜单
- Tablayout 点击Indicator抖动
- PhpStorm中快捷键总结,附详细使用说明
- Latex--论文编辑软件使用心得
- Linux——Centos下搭建MySQL环境
- LightOJ1094Farthest Nodes in a Tree(BFS+树的直径)
- 关于VC操作Office屏蔽掉“服务器正在运行中”要选择“切换到...”或"重试"的对话框
- Keeping Your App Responsive中文翻译
- 讨论SQLite数据库损坏与修复
- Android LruCache 实现原理解析
- ruby
- iOS js oc相互调用(JavaScriptCore)
- Swift中一切皆为对象
- tableView实现添加多个图片
- 递归算法获取截取的所有需要内容