home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / inole2 / interfac / isimpsit.cpp < prev    next >
C/C++ Source or Header  |  1995-05-03  |  3KB  |  115 lines

  1. /*
  2.  * ISIMPSIT.CPP
  3.  *
  4.  * Template ISimpleFrameSite interface implementation.
  5.  *
  6.  * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
  7.  *
  8.  * Kraig Brockschmidt, Microsoft
  9.  * Internet  :  kraigb@microsoft.com
  10.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  11.  */
  12.  
  13.  
  14. #include "isimpsit.h"
  15.  
  16.  
  17. /*
  18.  * CImpISimpleFrameSite::CImpISimpleFrameSite
  19.  * CImpISimpleFrameSite::~CImpISimpleFrameSite
  20.  *
  21.  * Parameters (Constructor):
  22.  *  pObj            LPVOID of the object we're in.
  23.  *  pUnkOuter       LPUNKNOWN to which we delegate.
  24.  */
  25.  
  26. CImpISimpleFrameSite::CImpISimpleFrameSite(LPVOID pObj
  27.     , LPUNKNOWN pUnkOuter)
  28.     {
  29.     m_cRef=0;
  30.     m_pObj=pObj;
  31.     m_pUnkOuter=pUnkOuter;
  32.     return;
  33.     }
  34.  
  35. CImpISimpleFrameSite::~CImpISimpleFrameSite(void)
  36.     {
  37.     return;
  38.     }
  39.  
  40.  
  41.  
  42. /*
  43.  * CImpISimpleFrameSite::QueryInterface
  44.  * CImpISimpleFrameSite::AddRef
  45.  * CImpISimpleFrameSite::Release
  46.  *
  47.  * Purpose:
  48.  *  Delegating IUnknown members for CImpISimpleFrameSite.
  49.  */
  50.  
  51. STDMETHODIMP CImpISimpleFrameSite::QueryInterface(REFIID riid
  52.     , LPVOID *ppv)
  53.     {
  54.     return m_pUnkOuter->QueryInterface(riid, ppv);
  55.     }
  56.  
  57. STDMETHODIMP_(ULONG) CImpISimpleFrameSite::AddRef(void)
  58.     {
  59.     ++m_cRef;
  60.     return m_pUnkOuter->AddRef();
  61.     }
  62.  
  63. STDMETHODIMP_(ULONG) CImpISimpleFrameSite::Release(void)
  64.     {
  65.     --m_cRef;
  66.     return m_pUnkOuter->Release();
  67.     }
  68.  
  69.  
  70.  
  71. /*
  72.  * CImpISimpleFrameSite::PreMessageFilter
  73.  *
  74.  * Purpose:
  75.  *  Allows the simple frame to pre-process messages that are
  76.  *  going to controls within it.
  77.  *
  78.  * Parameters:
  79.  *  Same as to a window procedure, plus:
  80.  *  plResult        LRESULT * in which to store the return value
  81.  *                  for the message.
  82.  *  pdwCookie       DWORD * in which to store extra information to
  83.  *                  pass to PostMessageFilter
  84.  */
  85.  
  86. STDMETHODIMP CImpISimpleFrameSite::PreMessageFilter(HWND hWnd
  87.     , UINT iMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult
  88.     , DWORD *pdwCookie)
  89.     {
  90.     return ResultFromScode(E_NOTIMPL);
  91.     }
  92.  
  93.  
  94.  
  95. /*
  96.  * CImpISimpleFrameSite::PostMessageFilter
  97.  *
  98.  * Purpose:
  99.  *  Allows the simple frame to post-process messages that are
  100.  *  going to controls within it.
  101.  *
  102.  * Parameters:
  103.  *  Same as to a window procedure, plus:
  104.  *  plResult        LRESULT * in which to store the return value
  105.  *                  for the message.
  106.  *  dwCookie        DWORD from PreMessageFilter
  107.  */
  108.  
  109. STDMETHODIMP CImpISimpleFrameSite::PostMessageFilter(HWND hWnd
  110.     , UINT iMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult
  111.     , DWORD dwCookie)
  112.     {
  113.     return ResultFromScode(E_NOTIMPL);
  114.     }
  115.