IE8打印问题 [英] IE8 Printing problem

查看:199
本文介绍了IE8打印问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的代码(C ++,MFC)中,我们使用MS ActiveX控件HTML视图进行打印-我们将ExecWB函数与OLECMDID_PRINT选项一起使用.当我们将MSOCMDEXECOPT_DONTPROMPTUSER参数传递给函数时,一切正常.当我们通过MSOCMDEXECOPT_PROMPTUSER时,将弹出``打印设置''对话框,并显示错误消息:``Internet Explorer脚本错误''; -错误:权限被拒绝,URL:res://ieframe.dll/preview.js

In our code (C++, MFC) we use MS ActiveX control HTML View for printing - We use ExecWB function with OLECMDID_PRINT option. When we pass MSOCMDEXECOPT_DONTPROMPTUSER parameter to the function everything is OK. When we pass MSOCMDEXECOPT_PROMPTUSER, the Print Setup dialog pops up and we get an error: "Internet Explorer script error" - Error: Permission denied, URL: res://ieframe.dll/preview.js

什么是问题?

推荐答案

您好

我在论坛上看到许多有关该问题的报告:
http://www.bing.com );
this-> m_explorer.Navigate2(var,NULL,NULL,NULL,NULL);

加载页面后,我发出OLECMDID_PRINT命令:

此-> m_explorer.ExecWB(OLECMDID_PRINT,MSOCMDEXECOPT_PROMPTUSER,NULL,NULL);

显示打印对话框时没有错误.

我在Windows 7 + IE8和Windows Vista + IE8上对此进行了测试.


贾嘉亮
Hello

I see many similar reports of the issue in the forum:
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/bc7a73df-d4e0-4292-83e4-80d58fc765af/
but I do not seem to be able to reproduce it in my lab. Could you please help me see the problem?

Here is my attempt:

In VS2008 (SP1), I created a MFC dialog project, and insert the Microsoft Web Browser control to the dialog. In the code behind, I navigate the webbrowser control to www.bing.com:

 COleVariant var(L"http://www.bing.com");
 this->m_explorer.Navigate2(var, NULL, NULL, NULL, NULL);

After the page is loaded, I issue the OLECMDID_PRINT command:

 this->m_explorer.ExecWB(OLECMDID_PRINT, MSOCMDEXECOPT_PROMPTUSER, NULL, NULL);

The print dialog is displayed without errors.

I tested this on Windows 7 + IE8, and Windows Vista + IE8.

Regards,
Jialiang Ge


这篇关于IE8打印问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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