void CActiveXUI::SetPos(RECT rc) { CControlUI::SetPos(rc); if( !m_bCreated ) DoCreateControl(); if( m_pUnk == NULL ) return; if( m_pControl == NULL ) return; SIZEL hmSize = { 0 }; SIZEL pxSize = { 0 }; pxSize.cx = m_rcItem.right - m_rcItem.left; pxSize.cy = m_rcItem.bottom - m_rcItem.top; PixelToHiMetric(&pxSize, &hmSize); if( m_pUnk != NULL ) { m_pUnk->SetExtent(DVASPECT_CONTENT, &hmSize); } if( m_pControl->m_pInPlaceObject != NULL ) { CRect rcItem = m_rcItem; if( !m_pControl->m_bWindowless ) rcItem.ResetOffset(); m_pControl->m_pInPlaceObject->SetObjectRects(&rcItem, &rcItem); } if( !m_pControl->m_bWindowless ) { ASSERT(m_pControl->m_pWindow); ::MoveWindow(*m_pControl->m_pWindow, m_rcItem.left, m_rcItem.top, m_rcItem.right - m_rcItem.left, m_rcItem.bottom - m_rcItem.top, TRUE); } }
void CActiveXUI::SetDelayCreate(bool bDelayCreate) { if( m_bDelayCreate == bDelayCreate ) return; if( bDelayCreate == false ) { if( m_bCreated == false && m_clsid != IID_NULL ) DoCreateControl(); } m_bDelayCreate = bDelayCreate; }
bool CActiveXUI::CreateControl(const CLSID clsid) { ASSERT(clsid!=IID_NULL); if( clsid == IID_NULL ) return false; m_bCreated = false; m_clsid = clsid; if( !m_bDelayCreate ) DoCreateControl(); return true; }
void AxWidget::SetDelayCreate(bool bDelayCreate) { if( m_bDelayCreate == bDelayCreate ) return; if( bDelayCreate == false && m_bCreated == false && m_clsid != IID_NULL) DoCreateControl(); m_bDelayCreate = bDelayCreate; }
bool AxWidget::CreateControl(const CLSID clsid) { if ( clsid == IID_NULL ) return false; m_bCreated = false; m_clsid = clsid; if ( !m_bDelayCreate ) DoCreateControl(); return true; }
void AxWidget::SetGeometry(Rect geometry) { Widget::SetGeometry(geometry); if ( !m_bCreated ) DoCreateControl(); if ( m_pContainer == NULL) return; m_pContainer->SetGeometry(m_geometry.GetRectStruct()); }