关于 ActiveX控件在IE浏览器中滚动条失效的处理方法

 将acitvex   插入到IE   里面后,拉动滚动条,当acitvex   控件有部分被IE   覆盖后,再拖回原来位置,横向的滚动条无法拖动.

这个问题是因为acitvex 控件在IE中没有被重画引起的.

解决思路:

(1)从html的js脚本出发:只要使得acitvex  闪动一下

<SCRIPT>
function doScroll()
{
// "objectEditor" is the name of the control.
document.getElementById("objectEditor").style.display = "none";
  document.getElementById("objectEditor").style.display ="";}
</SCRIPT>
<BODY οnscrοll="doScroll();">

 

(2)从activex控件内部重画机制出发: onPaint中

// NUMBER_OF_CHILDREN is predefined as the number of child windows
// that are hosted on this control

// m_Children is a member variable of the CWindowedCtrl class that
// stores an array of CWnd references to the child windows on the control.

void CWindowedCtrl::OnPaint()
{
   CPaintDC dc(this); // device context for painting<BR/>

   for(int i = 0 ; i < NUMBER_OF_CHILDREN ; i++)
   {
      m_Children[i].RedrawWindow(NULL,NULL,RDW_INVALIDATE | RDW_FRAME);  
   }

   COleControl::OnPaint(&dc);
}

 

引用处:

http://support.microsoft.com/kb/233391

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值