取消COM调用word,ppt时显示的正在切换对话框
来源:互联网 发布:优秀淘宝客服案例 编辑:程序博客网 时间:2024/05/20 06:52
http://support.microsoft.com/kb/248019/en-us
How to prevent the OLE Server Busy dialog box from appearing during a lengthy COM operation
View products that this article applies to.
Article ID : 248019
Last Review : November 21, 2006
Revision : 4.1
This article was previously published under Q248019
Note Microsoft Visual C++ .NET (2002) supports both the managed code model that is provided by the Microsoft .NET Framework and the unmanaged native Microsoft Windows code model. The information in this article applies only to unmanaged Visual C++ code.
Back to the top
SUMMARY
If you call a method on a COM server from an MFC COM client application and if the method takes a long time to process and return back, you won't be able to do anything on the client application and the OLE Server Busy dialog box pops up. This article explains how you can increase the time-out period of the COM call and also shows you how to avoid this dialog box.
Back to the top
MORE INFORMATION
Ensure that the MFC client application is calling AfxOleInit() to initialize COM. This is important, because AfxOleInit() also initializes and registers a COleMessageFilter data member in the CWinApp. Alternatively, you can create your own COleMessageFilter object and register that during the startup.
Use
AfxOleGetMessageFilter()->SetMessagePendingDelay(nTimeout);
to set the wait period on outgoing COM calls. If the COM call takes longer than nTimeout milliseconds, then the MFC Client application displays the OLE Server Busy dialog box.
Use,
AfxOleGetMessageFilter()->EnableNotRespondingDialog(FALSE);
to disable the Not Responding dialog box, which is displayed if a keyboard or mouse message is pending during an OLE call and the call has timed out.
Use
AfxOleGetMessageFilter()->EnableBusyDialog(FALSE);
to disable the busy dialog box from appearing after the COM call times out.
Another way to suppress the server busy dialog box is to use OleInitialize and OleUninitialize instead of AfxOleInit in your application.
- 取消COM调用word,ppt时显示的正在切换对话框
- 在VC中调用WORD(显示,修改,存盘,运行宏)之三。调用word的各种对话框翻页等。
- 在VC中调用WORD(显示,修改,存盘,运行宏)之三。调用word的各种对话框翻页等
- Android word /excel/ppt 显示
- 通过调用第三方实现word,ppt,excel的打开
- office新建word excel ppt时,图标显示异常的问题
- 对话框之间的切换,显示问题
- VC取消对话框任务栏显示
- 取消Word2007中“word正在设置文档的格式”,防止文档结构图错乱
- PrintDocument 打印时不显示正在打印对话框
- 点击对话框外部取消对话框显示设置
- 打开PPT 提示安装,非要取消才能显示PPT
- 粘贴时word左下角出现“正在与服务器联系以获取信息,按ESC取消”
- 关于C#操作PPT时遇到的“对COM组件的调用返回了错误HRESULT E_FAIL”错误的解决方法
- 关于C#操作PPT时遇到的“对COM组件的调用返回了错误HRESULT E_FAIL”错误的解决方法
- 每次打开 Office 的 Word、Excel……时 都会显示安装程序正在准备必要的文件的解决办法
- 每次打开 Office 的 Word、Excel……时 都会显示安装程序正在准备必要的文件的解决办法
- winform 调用进程打开word pdf ppt
- 用按钮调用jsp代码怎么写?
- 使用Microsoft提供的RSS工具包
- CVS服务器设置指南 for CentOs 4
- 第十三周--星期二
- 企业级UML/MDA工具Trufun 2007系列发布!
- 取消COM调用word,ppt时显示的正在切换对话框
- 第三夜 油 异闻录——每晚一个离奇故事 敬请期待,一天,一个离奇故事!如果您喜欢,请在评论里发表您的高见,支持,每天一个新故事!
- spring hibernate struts整合开发实例
- Pro visual c++/cli and .net 2.0 platform2 学习笔记(4 本书简介)
- 访问控制符public ,private ,protected,private protected的区别!
- 我所体会的软件项目管理 -01
- VMware的使用及配置虚拟网络
- Pro visual c++/cli and .net 2.0 platform2学习笔记的===通告和日志===
- cvs基本的几个命令解释