zoukankan      html  css  js  c++  java
  • 关于 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 onscroll="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

  • 相关阅读:
    Linux下pip3安装问题
    客户信息维护jsp
    Java开发环境搭建
    软件开发一般步骤
    PM
    需求分析
    结对编程
    GUI
    spring boot 整合cfx,axis2创建webservice客户端
    webserver 返回json 如何去掉 <string xmlns="http://tempuri.org/">
  • 原文地址:https://www.cnblogs.com/superch0054/p/4010124.html
Copyright © 2011-2022 走看看