OIPAOBJ.CPP
资源名称:MSDN_VC98.zip [点击查看]
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:6k
源码类别:
Windows编程
开发平台:
Visual C++
- /**************************************************************************
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- PARTICULAR PURPOSE.
- Copyright 1997 Microsoft Corporation. All Rights Reserved.
- **************************************************************************/
- /**************************************************************************
- File: OIPAObj.cpp
- Description: COleInPlaceActiveObject implementation.
- **************************************************************************/
- /**************************************************************************
- #include statements
- **************************************************************************/
- #include "OIPAObj.h"
- /**************************************************************************
- COleInPlaceActiveObject::COleInPlaceActiveObject()
- **************************************************************************/
- COleInPlaceActiveObject::COleInPlaceActiveObject(COleDocument *pOleDoc)
- {
- OutputDebugString(TEXT("COleInPlaceActiveObject's constructorn"));
- m_pOleDoc = pOleDoc;
- m_fEnableModeless = FALSE;
- }
- /**************************************************************************
- COleInPlaceActiveObject::~COleInPlaceActiveObject()
- **************************************************************************/
- COleInPlaceActiveObject::~COleInPlaceActiveObject()
- {
- OutputDebugString(TEXT("COleInPlaceActiveObject's destructorn"));
- }
- /**************************************************************************
- COleInPlaceActiveObject::QueryInterface()
- **************************************************************************/
- STDMETHODIMP COleInPlaceActiveObject::QueryInterface(REFIID riid, LPVOID *ppReturn)
- {
- OutputDebugString(TEXT("COleInPlaceActiveObject::QueryInterfacen"));
- return m_pOleDoc->QueryInterface(riid, ppReturn);
- }
- /**************************************************************************
- COleInPlaceActiveObject::AddRef()
- **************************************************************************/
- STDMETHODIMP_(ULONG) COleInPlaceActiveObject::AddRef()
- {
- OutputDebugString(TEXT("COleInPlaceActiveObject::AddRefn"));
- return m_pOleDoc->AddRef();
- }
- /**************************************************************************
- COleInPlaceActiveObject::Release()
- **************************************************************************/
- STDMETHODIMP_(ULONG) COleInPlaceActiveObject::Release()
- {
- OutputDebugString(TEXT("COleInPlaceActiveObject::Releasen"));
- return m_pOleDoc->Release();
- }
- /**************************************************************************
- COleInPlaceActiveObject::OnDocWindowActivate()
- **************************************************************************/
- STDMETHODIMP COleInPlaceActiveObject::OnDocWindowActivate(BOOL fActivate)
- {
- OutputDebugString(TEXT("COleInPlaceActiveObject::OnDocWindowActivaten"));
- //If we are getting activated, merge our menus.
- if(fActivate)
- {
- if(m_pOleDoc->m_pOleDocView)
- {
- m_pOleDoc->m_pOleDocView->MergeMenus();
- }
- }
- return S_OK;
- }
- /**************************************************************************
- COleInPlaceActiveObject::OnFrameWindowActivate()
- **************************************************************************/
- STDMETHODIMP COleInPlaceActiveObject::OnFrameWindowActivate(BOOL fActivate)
- {
- OutputDebugString(TEXT("COleInPlaceActiveObject::OnFrameWindowActivaten"));
- return S_OK;
- }
- /**************************************************************************
- COleInPlaceActiveObject::GetWindow()
- **************************************************************************/
- STDMETHODIMP COleInPlaceActiveObject::GetWindow(HWND *phwnd)
- {
- OutputDebugString(TEXT("COleInPlaceActiveObject::GetWindown"));
- return m_pOleDoc->GetWindow(phwnd);
- }
- /**************************************************************************
- COleInPlaceActiveObject::ContextSensitiveHelp()
- **************************************************************************/
- STDMETHODIMP COleInPlaceActiveObject::ContextSensitiveHelp(BOOL fEnterMode)
- {
- OutputDebugString(TEXT("COleInPlaceActiveObject::ContextSensitiveHelpn"));
- return E_NOTIMPL;
- }
- /**************************************************************************
- COleInPlaceActiveObject::TranslateAccelerator()
- **************************************************************************/
- STDMETHODIMP COleInPlaceActiveObject::TranslateAccelerator(LPMSG lpmsg)
- {
- OutputDebugString(TEXT("COleInPlaceActiveObject::TranslateAcceleratorn"));
- // no accelerator table, return FALSE
- return S_FALSE;
- }
- /**************************************************************************
- COleInPlaceActiveObject::ResizeBorder()
- **************************************************************************/
- STDMETHODIMP COleInPlaceActiveObject::ResizeBorder( LPCRECT lprectBorder,
- LPOLEINPLACEUIWINDOW lpUIWindow,
- BOOL fFrameWindow)
- {
- OutputDebugString(TEXT("COleInPlaceActiveObject::ResizeBordern"));
- return S_OK;
- }
- /**************************************************************************
- COleInPlaceActiveObject::EnableModeless()
- **************************************************************************/
- STDMETHODIMP COleInPlaceActiveObject::EnableModeless(BOOL fEnable)
- {
- OutputDebugString(TEXT("COleInPlaceActiveObject::EnableModelessn"));
- m_fEnableModeless = fEnable;
- return S_OK;
- }