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 / scrmngr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  951 b   |  29 lines

  1. class CTestContainer98Doc;
  2. class CScriptManager;
  3.  
  4. class CScriptManager :
  5.    public CObject
  6. {
  7.    DECLARE_DYNAMIC( CScriptManager );
  8.  
  9. public:
  10.    CScriptManager( CTestContainer98Doc* pDoc );
  11.    ~CScriptManager();
  12.  
  13.    HRESULT AddNamedItem( LPCTSTR pszItemName, IDispatch* pDispatch );
  14.    HRESULT AddNamedItems( IActiveScript* pScript );
  15.    CScript* FindMacro( LPCTSTR pszMacroName );
  16.    POSITION GetFirstScriptPosition() const;
  17.    HRESULT GetItemDispatch( LPCTSTR pszItemName, IUnknown** ppDispatch );
  18.    HRESULT GetItemTypeInfo( LPCTSTR pszItemName, ITypeInfo** ppTypeInfo );
  19.    CScript* GetNextScript( POSITION& posScript );
  20.    int GetNumScripts() const;
  21.    HRESULT LoadScript( LPCTSTR pszFileName, LPCTSTR pszScriptName,
  22.       CScript** ppScript = NULL );
  23.  
  24. protected:
  25.    CTestContainer98Doc* m_pDoc;
  26.    CTypedPtrList< CObList, CScript* > m_lpScripts;
  27.    CTypedPtrMap< CMapStringToPtr, CString, IDispatch* > m_mapNamedItems;
  28. };
  29.