Closed GoogleCodeExporter closed 9 years ago
这个问题是 CActiveXUI中的BUG
void CActiveXUI::SetVisible(bool bVisible)
{
CControlUI::SetVisible(bVisible);
if( m_hwndHost != NULL ) ::ShowWindow(m_hwndHost, IsVisible() ? SW_SHOW : SW_HIDE);
}
void CActiveXUI::SetInternVisible(bool bVisible)
{
CControlUI::SetInternVisible(bVisible);
if( m_hwndHost != NULL ) ::ShowWindow(m_hwndHost, IsVisible() ? SW_SHOW : SW_HIDE);
}
当切换tab页的时候,隐藏activex控件导致整个 window被隐藏,
改为下面就好了:
void CActiveXUI::SetVisible(bool bVisible)
{
CControlUI::SetVisible(bVisible);
if( m_hwndHost != NULL ) //::ShowWindow(m_hwndHost, IsVisible() ? SW_SHOW : SW_HIDE);
{
if (bVisible == false)
{
SetPos(CRect(0,0,0,0));
}
else
{
SetPos(m_rcItem);
}
}
}
void CActiveXUI::SetInternVisible(bool bVisible)
{
CControlUI::SetInternVisible(bVisible);
// if( m_hwndHost != NULL ) //::ShowWindow(m_hwndHost, IsVisible() ? SW_SHOW : SW_HIDE);
if( m_hwndHost != NULL ) //::ShowWindow(m_hwndHost, IsVisible() ? SW_SHOW : SW_HIDE);
{
if (bVisible == false)
{
SetPos(CRect(0,0,0,0));
}
else
{
SetPos(m_rcItem);
}
}
}
Original comment by andywei...@gmail.com
on 27 Sep 2011 at 3:32
是不是用了windowless的flash控件?
改成这样行不行呢
void CActiveXUI::SetVisible(bool bVisible)
{
CControlUI::SetVisible(bVisible);
if( m_hwndHost != NULL && !m_pControl->m_bWindowless )
::ShowWindow(m_hwndHost, IsVisible() ? SW_SHOW : SW_HIDE);
}
void CActiveXUI::SetInternVisible(bool bVisible)
{
CControlUI::SetInternVisible(bVisible);
if( m_hwndHost != NULL && !m_pControl->m_bWindowless )
::ShowWindow(m_hwndHost, IsVisible() ? SW_SHOW : SW_HIDE);
}
Original comment by wangc...@gmail.com
on 27 Sep 2011 at 2:52
对,是用了windowless的flash控件,,按照你的方法可以,谢谢��
�哈!
另外,问下,这个库怎么显示gif动画,,我找了个ImageOle.dll��
�示gif控件,但是gif不动,只能显示一帧。是怎么回事呢?谢�
��!
if (msg.pSender->GetName() ==_T("gif"))
{
ImageOleLib::IGifAnimator * m_pgif = NULL;
CActiveXUI* m_pActiveX = static_cast<CActiveXUI*>(msg.pSender);
//获取接口
if (m_pgif != NULL)
{
m_pgif->LoadFromFile(_bstr_t(CPaintManagerUI::GetInstancePath() + _T("Ui\\load.gif")));
m_pgif->TriggerFrameChange();
m_pgif->Release();
}
}
}
Original comment by andywei...@gmail.com
on 28 Sep 2011 at 4:39
Attachments:
Original comment by wangc...@gmail.com
on 28 Sep 2011 at 6:25
Original issue reported on code.google.com by
andywei...@gmail.com
on 26 Sep 2011 at 1:08