首页 > MFC > MFC新建类时弹出“当前页面脚本发生错误”

MFC新建类时弹出“当前页面脚本发生错误”

2013年2月17日 发表评论 阅读评论

其实这个问题我已经遇到过好几次了,但是每次弄好后都忘了,所以这次记录一下;

其实问题的原因在于IE8和VS冲突了,如果不装IE8就不会有事。(我XP也不知道什么时候装的IE8。。)

找了一下,原因这么写的。。

Visual C++ team has discovered that after installing the current release of Internet Explorer (Internet Explorer 8), some VC++ wizards do not function correctly.  The products affected are Visual Studio 2005 and Visual Studio 2008.  Following are the affected wizards:

          Add Function

          Add Variable

          Smart Device – New Project Creation

          Smart Device – Add Class

Invoking any of the above wizards in VS2005 or VS2008 will pop up a script error if IE8 is installed on the machine.  We have a workaround for those who have encountered this error.

Please follow the following steps:

          Open regedit (on a 64-bit OS, open the 32-bit regedit)

          Under “HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet
SettingsZones”, create a new key called 1000 (if it isn’t already there)

          Under 1000, create a DWORD entry with:

o   Name = 1207

o   Type = REG_DWORD

o   Data = 0x000000

For the workaround to work on VS2005 however, the VS2005 SP1 (and VS2005 SP1 Update for Windows Vista) has to be installed.

 

Following is a brief explanation of the problem and the workaround:

The VC++ Wizards Engine implements the IInternetSecurityManager interface.  In this implementation it allows or disallows specific actions under certain policies that Internet Explorer queries it about.  In IE8 a custom Security Manager now also gets queried about the URLACTION_ACTIVEX_OVERRIDE_REPURPOSEDETECTION policy which IE previously did not delegate to custom security managers when the engine wasn’t running in the iexplore.exe process.  The IE engine then fails this action because we don’t have a policy entry for it in the custom zone for VC++ Wizards. We are still investigating whether this change in IE8 is by design and will possibly be addressing it by a fix in either the Wizard or IE components depending on the outcome.

 

The above workaround lets the policy 1207 (URLACTION_ACTIVEX_OVERRIDE_REPURPOSEDETECTION) to be allowed in zone 1000 (custom zone of VC++ Wizards engine).  This allows the wizard code to work as intended.

 

We apologize for the inconvenience this issue may have caused you.

 

Thank you

Visual C++ Team

有闲情就看英文吧,懒得看,反正方法就是:

在注册表HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones中,添加一项1000,没有就新建,然后在这一项里面添加DWORD项,名为1207,类型是REG_DWORD,数据值为0X000000,便可大功告成。


【完】

本文内容遵从CC版权协议,转载请注明出自http://www.kylen314.com

分类: MFC 标签:
  1. 本文目前尚无任何评论.
验证码:5 + 1 = ?

友情提示:留言可以使用大部分html标签和属性;

添加代码示例:[code lang="cpp"]your code...[/code]

添加公式请用Latex代码,前后分别添加两个$$