本文整理汇总了C++中CActiveXUI::GetManager方法的典型用法代码示例。如果您正苦于以下问题:C++ CActiveXUI::GetManager方法的具体用法?C++ CActiveXUI::GetManager怎么用?C++ CActiveXUI::GetManager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CActiveXUI
的用法示例。
在下文中一共展示了CActiveXUI::GetManager方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnInPlaceActivateEx
STDMETHODIMP CActiveXCtrl::OnInPlaceActivateEx(BOOL* pfNoRedraw, DWORD dwFlags)
{
TRACE(_T("AX: CActiveXCtrl::OnInPlaceActivateEx"));
ASSERT(m_pInPlaceObject==NULL);
if( m_pOwner == NULL ) return E_UNEXPECTED;
if( m_pOwner->m_pUnk == NULL ) return E_UNEXPECTED;
::OleLockRunning(m_pOwner->m_pUnk, TRUE, FALSE);
HWND hWndFrame = m_pOwner->GetManager()->GetPaintWindow();
HRESULT Hr = E_FAIL;
if( (dwFlags & ACTIVATE_WINDOWLESS) != 0 ) {
m_bWindowless = true;
Hr = m_pOwner->m_pUnk->QueryInterface(IID_IOleInPlaceObjectWindowless, (LPVOID*) &m_pInPlaceObject);
m_pOwner->m_hwndHost = hWndFrame;
m_pOwner->GetManager()->AddMessageFilter(m_pOwner);
}
if( FAILED(Hr) ) {
m_bWindowless = false;
Hr = CreateActiveXWnd();
if( FAILED(Hr) ) return Hr;
Hr = m_pOwner->m_pUnk->QueryInterface(IID_IOleInPlaceObject, (LPVOID*) &m_pInPlaceObject);
}
if( m_pInPlaceObject != NULL ) {
CRect rcItem = m_pOwner->m_rcItem;
if( !m_bWindowless ) rcItem.ResetOffset();
m_pInPlaceObject->SetObjectRects(&rcItem, &rcItem);
}
m_bInPlaceActive = SUCCEEDED(Hr);
return Hr;
}
示例2: CreateActiveXWnd
HRESULT CActiveXCtrl::CreateActiveXWnd()
{
if( m_pWindow != NULL ) return S_OK;
m_pWindow = new CActiveXWnd;
if( m_pWindow == NULL ) return E_OUTOFMEMORY;
m_pOwner->m_hwndHost = m_pWindow->Init(this, m_pOwner->GetManager()->GetPaintWindow());
return S_OK;
}
示例3: GetWindowContext
STDMETHODIMP CActiveXCtrl::GetWindowContext(IOleInPlaceFrame** ppFrame, IOleInPlaceUIWindow** ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
{
TRACE(_T("AX: CActiveXCtrl::GetWindowContext"));
if( ppDoc == NULL ) return E_POINTER;
if( ppFrame == NULL ) return E_POINTER;
if( lprcPosRect == NULL ) return E_POINTER;
if( lprcClipRect == NULL ) return E_POINTER;
*ppFrame = new CActiveXFrameWnd(m_pOwner);
*ppDoc = NULL;
ACCEL ac = { 0 };
HACCEL hac = ::CreateAcceleratorTable(&ac, 1);
lpFrameInfo->cb = sizeof(OLEINPLACEFRAMEINFO);
lpFrameInfo->fMDIApp = FALSE;
lpFrameInfo->hwndFrame = m_pOwner->GetManager()->GetPaintWindow();
lpFrameInfo->haccel = hac;
lpFrameInfo->cAccelEntries = 1;
return S_OK;
}
示例4: STDMETHOD
// IOleWindow
STDMETHOD(GetWindow)(HWND* phwnd)
{
if( m_pOwner == NULL ) return E_UNEXPECTED;
*phwnd = m_pOwner->GetManager()->GetPaintWindow();
return S_OK;
}