将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);
}
引用处: