home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / oleview / iviewers / iadvsink.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  1.3 KB  |  44 lines

  1. // iadvsink.h
  2.  
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #ifndef _IADVSINK_H_
  14. #define _IADVSINK_H_
  15.  
  16. //#if defined(WIN32) && !defined(_UNICODE)
  17. //    #define CImpIAdviseSink CImpIAdviseSinkA
  18. //    #define CIDataObjectDlg CIDataObjectDlgA
  19. //#endif
  20.  
  21. class FAR CImpIAdviseSink : public IAdviseSink
  22. {
  23. protected:
  24.     ULONG               m_cRef;      //Interface reference count.
  25.     CIDataObjectDlg FAR* m_pIDOD ;       //Back pointer to the application
  26.  
  27. public:
  28.     CImpIAdviseSink(CIDataObjectDlg FAR*);
  29.     ~CImpIAdviseSink(void);
  30.  
  31.     STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  32.     STDMETHODIMP_(ULONG) AddRef(void);
  33.     STDMETHODIMP_(ULONG) Release(void);
  34.  
  35.     //We only implement OnDataChange for now.
  36.     STDMETHODIMP_(void)  OnDataChange(LPFORMATETC, LPSTGMEDIUM);
  37.     STDMETHODIMP_(void)  OnViewChange(DWORD, LONG);
  38.     STDMETHODIMP_(void)  OnRename(LPMONIKER);
  39.     STDMETHODIMP_(void)  OnSave(void);
  40.     STDMETHODIMP_(void)  OnClose(void);
  41. };
  42.  
  43. #endif //_IADVSINK_H_
  44.