Beispiel #1
0
    HRESULT STDMETHODCALLTYPE OnInPlaceDeactivateEx(BOOL)
    {
#ifdef __WXWINCE__
        IRunnableObject* runnable = NULL;
        HRESULT hr = QueryInterface(
            IID_IRunnableObject, (void**)(& runnable));
        if (SUCCEEDED(hr))
        {
            runnable->LockRunning(FALSE, FALSE);
        }
#else
        OleLockRunning(m_window->m_ActiveX, FALSE, FALSE);
#endif
        return S_OK;
    }
Beispiel #2
0
    //*************************IOleInPlaceSiteEx***********************
    HRESULT STDMETHODCALLTYPE OnInPlaceActivateEx(BOOL * pfNoRedraw, DWORD)
    {
#ifdef __WXWINCE__
        IRunnableObject* runnable = NULL;
        HRESULT hr = QueryInterface(
            IID_IRunnableObject, (void**)(& runnable));
        if (SUCCEEDED(hr))
        {
            runnable->LockRunning(TRUE, FALSE);
        }
#else
        OleLockRunning(m_window->m_ActiveX, TRUE, FALSE);
#endif
        if (pfNoRedraw)
            (*pfNoRedraw) = FALSE;
        return S_OK;
    }
Beispiel #3
0
 // IOleInPlaceSiteEx
 STDMETHOD(OnInPlaceActivateEx)(BOOL *pfNoRedraw, DWORD dwFlags)
 {
     HRESULT hr = S_FALSE;
     OleLockRunning(m_spOleObject, TRUE, FALSE);
     if (pfNoRedraw) {
         *pfNoRedraw = FALSE;
     }
     if ((dwFlags & ACTIVATE_WINDOWLESS) != 0) {
         if ( m_spOleObjectWindowless != NULL ) {
             m_bInplaceActive = true;
             hr = S_OK;
         }
     } else {
         // object is not windowless, ensure we won't dispatch message to this control
         m_bInplaceActive = false;
     }
     return hr;
 }
Beispiel #4
0
void COleClientItem::OnActivate()
{
	ASSERT_VALID(this);

	// it is necessary to lock the object when it is in-place
	//  (without this, a link to an embedding may disconnect unexpectedly)
	if (!m_bLocked)
	{
		OleLockRunning(m_lpObject, TRUE, FALSE);
		m_bLocked = TRUE;
	}

	// notify the item of the state change
	if (m_nItemState != activeState)
	{
		OnChange(OLE_CHANGED_STATE, (DWORD)activeState);
		m_nItemState = activeState;
	}
}