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 / iproppsi.cpp < prev    next >
C/C++ Source or Header  |  1995-05-03  |  3KB  |  144 lines

  1. /*
  2.  * IPROPPSI.CPP
  3.  *
  4.  * Template IPropertyPageSite 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 "iproppsi.h"
  15.  
  16.  
  17. /*
  18.  * CImpIPropertyPageSite::CImpIPropertyPageSite
  19.  * CImpIPropertyPageSite::~CImpIPropertyPageSite
  20.  *
  21.  * Parameters (Constructor):
  22.  *  pObj            LPVOID of the object we're in.
  23.  *  pUnkOuter       LPUNKNOWN to which we delegate.
  24.  */
  25.  
  26. CImpIPropertyPageSite::CImpIPropertyPageSite(LPVOID pObj
  27.     , LPUNKNOWN pUnkOuter)
  28.     {
  29.     m_cRef=0;
  30.     m_pObj=pObj;
  31.     m_pUnkOuter=pUnkOuter;
  32.     return;
  33.     }
  34.  
  35. CImpIPropertyPageSite::~CImpIPropertyPageSite(void)
  36.     {
  37.     return;
  38.     }
  39.  
  40.  
  41.  
  42. /*
  43.  * CImpIPropertyPageSite::QueryInterface
  44.  * CImpIPropertyPageSite::AddRef
  45.  * CImpIPropertyPageSite::Release
  46.  *
  47.  * Purpose:
  48.  *  Delegating IUnknown members for CImpIPropertyPageSite.
  49.  */
  50.  
  51. STDMETHODIMP CImpIPropertyPageSite::QueryInterface(REFIID riid
  52.     , LPVOID *ppv)
  53.     {
  54.     return m_pUnkOuter->QueryInterface(riid, ppv);
  55.     }
  56.  
  57. STDMETHODIMP_(ULONG) CImpIPropertyPageSite::AddRef(void)
  58.     {
  59.     ++m_cRef;
  60.     return m_pUnkOuter->AddRef();
  61.     }
  62.  
  63. STDMETHODIMP_(ULONG) CImpIPropertyPageSite::Release(void)
  64.     {
  65.     --m_cRef;
  66.     return m_pUnkOuter->Release();
  67.     }
  68.  
  69.  
  70.  
  71. /*
  72.  * CImpIPropertyPageSite::OnStatusChange
  73.  *
  74.  * Purpose:
  75.  *  Informs the page site that the status of its page has changed
  76.  *  according to the flags in dwFlags:
  77.  *      PROPPAGESTATUS_DIRTY        A value was changed.
  78.  *      PROPPAGESTATUS_VALIDATE     It's an appropriate time to
  79.  *                                  validate and apply changes.
  80.  *
  81.  * Parameters:
  82.  *  dwFlags         DWORD identifying the changes.
  83.  */
  84.  
  85. STDMETHODIMP CImpIPropertyPageSite::OnStatusChange(DWORD dwFlags)
  86.     {
  87.     return ResultFromScode(E_NOTIMPL);
  88.     }
  89.  
  90.  
  91.  
  92. /*
  93.  * CImpIPropertyPageSite::GetLocaleID
  94.  *
  95.  * Purpose:
  96.  *  Retrieves the LCID for the page frame, if the page wants to
  97.  *  localize to this locale.
  98.  *
  99.  * Parameters:
  100.  *  plcid           LCID * in which to store the LCID.
  101.  */
  102.  
  103. STDMETHODIMP CImpIPropertyPageSite::GetLocaleID(LCID *plcid)
  104.     {
  105.     return ResultFromScode(E_NOTIMPL);
  106.     }
  107.  
  108.  
  109.  
  110. /*
  111.  * CImpIPropertyPageSite::GetPageContainer
  112.  *
  113.  * Purpose:
  114.  *  Retrieves a pointer to the property frame.
  115.  *
  116.  * Parameters:
  117.  *  ppUnk           IUnknown ** in which to return the frame's
  118.  *                  IUnknown pointer.
  119.  */
  120.  
  121. STDMETHODIMP CImpIPropertyPageSite::GetPageContainer(IUnknown **ppUnk)
  122.     {
  123.     *ppUnk=NULL;
  124.     return ResultFromScode(E_NOTIMPL);
  125.     }
  126.  
  127.  
  128.  
  129.  
  130. /*
  131.  * CImpIPropertyPageSite::TranslateAccelerator
  132.  *
  133.  * Purpose:
  134.  *  Provides the page site with the oportunity to process messages.
  135.  *
  136.  * Parameters:
  137.  *  pMsg            LPMSG containing the message of the accelerator.
  138.  */
  139.  
  140. STDMETHODIMP CImpIPropertyPageSite::TranslateAccelerator(LPMSG lpMsg)
  141.     {
  142.     return ResultFromScode(E_NOTIMPL);
  143.     }
  144.