/// DLコントロールを設定する void CDonutView::PutDLControlFlags(DWORD dwDLControlFlags) { m_dwDLControlFlags = dwDLControlFlags; m_dwDefaultDLControlFlags = dwDLControlFlags; CComQIPtr<IDispatch> spDisp = m_spHost; if (spDisp) { VARIANT varResult; DISPPARAMS params = { 0 }; HRESULT hr = spDisp->Invoke(DISPID_AMBIENT_DLCONTROL, IID_NULL, 1041 /*JP*/, DISPATCH_PROPERTYPUT, ¶ms, &varResult, NULL, NULL); } #if 0 HRESULT hr; CComQIPtr<IOleObject> spOleObject = m_spBrowser; ATLASSERT(spOleObject); CComPtr<IOleClientSite> spOleOrgSite; hr = spOleObject->GetClientSite(&spOleOrgSite); // 現在のサイトを保存 hr = spOleObject->SetClientSite((IOleClientSite*)this); CComQIPtr<IOleControl> spOleControl = m_spBrowser; ATLASSERT(spOleControl); hr = spOleControl->OnAmbientPropertyChange(DISPID_AMBIENT_DLCONTROL); spOleObject->SetClientSite(spOleOrgSite); #endif }
void CIGMultiFrame::addFrame (IIGFrame *pFrame) { if (m_spToolBox) pFrame->SetToolBox (m_spToolBox); CComQIPtr <IOleObject> spMultiFrameOleObject (this); CComPtr <IOleClientSite> spOleClientSite; spMultiFrameOleObject->GetClientSite (&spOleClientSite); CComQIPtr <IOleObject> spFrameOleObject (pFrame); spFrameOleObject->SetClientSite (spOleClientSite); spFrameOleObject.Detach(); if (pFrame && !frameExists (pFrame) && m_nNbFrames < IGFRAMES_MAX) { m_ppFrames [m_nNbFrames++] = pFrame; } autoArrange(); }