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

  1. class CAmbientProperty :
  2.    public CObject
  3. {
  4.    DECLARE_SERIAL( CAmbientProperty );
  5.  
  6. public:
  7.    CAmbientProperty();
  8.    CAmbientProperty( DISPID dispid, LPCTSTR pszName, const VARIANT& var,
  9.       int vti, BOOL tStock = FALSE );
  10.  
  11.    void Enable( BOOL tEnabled );
  12.    DISPID GetID() const;
  13.    CString GetName() const;
  14.    const COleVariant& GetValue() const;
  15.    int GetVTI() const;
  16.    BOOL IsEnabled() const;
  17.    BOOL IsStock() const;
  18.    void SetValue( const VARIANT& varValue, int vti = -1 );
  19.  
  20.    void Serialize( CArchive& ar );
  21.  
  22. protected:
  23.    DISPID m_dispid;
  24.    CString m_strName;
  25.    COleVariant m_varValue;
  26.    int m_vti;
  27.    BOOL m_tEnabled;
  28.    BOOL m_tStock;
  29. };
  30.