home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / inproc / enumvar.h < prev    next >
C/C++ Source or Header  |  1998-03-26  |  2KB  |  62 lines

  1. // enumvar.h : header file
  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. /////////////////////////////////////////////////////////////////////////////
  14. // CEnumVariant command target
  15.  
  16. class CEnumVariant : public CCmdTarget
  17. {
  18.     DECLARE_DYNCREATE(CEnumVariant)
  19. public:
  20.     CEnumVariant();         // protected constructor used by dynamic creation
  21.  
  22. // Attributes
  23. public:
  24.     int m_nIndex;           // next/current position w/in m_rgContents
  25.     int m_nCount;           // total count of variants
  26.     VARIANT* m_pContents;   // contents of collection
  27.  
  28. // Operations
  29. public:
  30.     void SetContents(VARIANT* pContents, int nCount, int nIndex = 0);
  31.  
  32. // Overrides
  33.     // ClassWizard generated virtual function overrides
  34.     //{{AFX_VIRTUAL(CEnumVariant)
  35.     public:
  36.     virtual void OnFinalRelease();
  37.     //}}AFX_VIRTUAL
  38.  
  39. // Implementation
  40. protected:
  41.     virtual ~CEnumVariant();
  42.     CEnumVariant* m_pClonedFrom;
  43.  
  44.     // Generated message map functions
  45.     //{{AFX_MSG(CEnumVariant)
  46.         // NOTE - the ClassWizard will add and remove member functions here.
  47.     //}}AFX_MSG
  48.     DECLARE_MESSAGE_MAP()
  49.  
  50. public:
  51.     // Implementation of IEnumVARIANT
  52.     BEGIN_INTERFACE_PART(EnumVARIANT, IEnumVARIANT)
  53.         STDMETHOD(Next)(ULONG celt, VARIANT* rgvar, ULONG* pceltFetched);
  54.         STDMETHOD(Skip)(ULONG celt) ;
  55.         STDMETHOD(Reset)() ;
  56.         STDMETHOD(Clone)(IEnumVARIANT** ppenum);
  57.     END_INTERFACE_PART(EnumVARIANT)
  58.     DECLARE_INTERFACE_MAP()
  59. };
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62.