📄 vc7automationhelper.h
字号:
#if !defined(__Vc7AutomationHelper_H__)
#define __Vc7AutomationHelper_H__
/************************************************************************
*
* Resource ID Organiser Add-In for Visual C++
*
* (c) Copyright 2000-2005 by Riverblade Limited (UK). All rights reserved.
*
************************************************************************
*
* Filename : Vc7AutomationHelper.h
*
* Description : CVc7AutomationHelper - Visual Studio.NET COM interface
* wrapper class
*
* Compiler : Microsoft Visual C++ .NET 2003
*
* Target
* Environment : Windows 2000/XP/Vista;
* Visual Studio 2002, 2003 or 2005
*
* NOTE:
*
* This software is provided "as is". All title and copyrights in and
* to the software, including but not limited to any images, text etc.
* etc. incorporated into it, are the property of Anna-Jayne Metcalfe
* and Riverblade Limited, except where acknowledged otherwise.
*
* Your may freely use this code in your own products, PROVIDED
* this notice is not removed or modified.
*
* Please visit http://www.riverblade.co.uk/products/resorg or email
* support@riverblade.co.uk for latest updates and product support
*
************************************************************************
*
* MODIFICATION HISTORY:
*
* This is a controlled document. See project configuration
* control tool for latest version and full version history.
*
* $Archive: /Projects/AddIns/ResOrg/ResOrgNETAddIn/Vc7AutomationHelper.h $
* $Revision: 6 $
* $Date: 22/10/05 16:40 $
* $Author: Anna $
*
* $History: Vc7AutomationHelper.h $
*
* ***************** Version 6 *****************
* User: Anna Date: 22/10/05 Time: 16:40
* Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddIn
* Moved CVc6AutomationHelper and CVc7AutomationHelper to the ResOrgAddIn
* and ResOrgNETAddIn projects respectively.
*
* ***************** Version 4 *****************
* User: Anna Date: 13/10/05 Time: 13:07
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Modified #imports for DTE and MSO to import smart pointer interfaces as
* well as raw ones. Also included lint directives so PC-Lint can identify
* the .tlh and .tli files for interfaces imported by LIBID.
*
* ***************** Version 3 *****************
* User: Anna Date: 25/11/02 Time: 15:20
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Changed website address in banner
*
* ***************** Version 2 *****************
* User: Anna Date: 22/10/02 Time: 13:24
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Changed name/mail address (at last!)
*
* ***************** Version 1 *****************
* User: Andy Date: 1/08/02 Time: 16:30
* Created in $/Projects/AddIns/ResOrg/ResOrgCore
*
* ***************** Version 2 *****************
* User: Andy Date: 10/06/02 Time: 17:16
* Updated in $/Projects/AddIns/ResOrg/ResOrgAddInVc7
* Got it working with VC.NET !!
*
* ***************** Version 1 *****************
* User: Andy Date: 7/06/02 Time: 22:31
* Created in $/Projects/AddIns/ResOrg/ResOrgAddInVc7
*
* $Nokeywords: $
*
************************************************************************/
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
typedef CTypedPtrArray<CPtrArray, EnvDTE::Project*> CVc7ProjectArray;
typedef CTypedPtrArray<CPtrArray, EnvDTE::Document*> CVc7DocumentArray;
/////////////////////////////////////////////////////////////////////////////
// CVc7AutomationHelper command target
class /*RESORGCORE_EXT_CLASS*/ CVc7AutomationHelper : public CObject
{
public:
CVc7AutomationHelper(void);
virtual ~CVc7AutomationHelper(void);
// Attributes
protected:
CComPtr<EnvDTE::_DTE> m_pDTE;
// Operations
public:
/////////////////////////////////////////////////////////////////////////////
// DTE
CComPtr<EnvDTE::_DTE> GetDTE(void) const
{ return m_pDTE; }
BOOL SetDTE(CComPtr<EnvDTE::_DTE> pDTE);
/////////////////////////////////////////////////////////////////////////////
// Solution
CString GetSolutionPathName(void) const;
/////////////////////////////////////////////////////////////////////////////
// Projects
int GetProjectCount(void) const;
int GetProjectNames(CStringArray& rarrayNames) const;
int GetProjectFullNames(CStringArray& rarrayNames) const;
int GetProjects(CVc7ProjectArray& rarrayProjects) const;
//EnvDTE::Project* GetActiveProject(void) const;
EnvDTE::Project* GetProject(const CString& sFullName) const;
static CString GetName(EnvDTE::Project* pProject);
static CString GetFullName(EnvDTE::Project* pProject);
//BOOL SetActiveProject(EnvDTE::Project* pActiveProject);
BOOL LoadProject(EnvDTE::Project* pProject);
BOOL UnloadProject(EnvDTE::Project* pProject);
/////////////////////////////////////////////////////////////////////////////
// Documents (open files)
int GetDocumentCount(void) const;
int GetDocumentNames(CStringArray& rarrayNames) const;
int GetDocuments(CVc7DocumentArray& rarrayDocuments) const;
EnvDTE::Document* GetDocument(const CString& sFullName) const;
static CString GetName(EnvDTE::Document* pDocument);
static CString GetFullName(EnvDTE::Document* pDocument);
BOOL CloseDocument(const CString& sFileName);
/////////////////////////////////////////////////////////////////////////////
// Resource Files
CString GetResourceFileName(const CString& sProject) const;
BOOL CloseResourceFile(const CString& sFileName);
// Overrides
protected:
// Implementation
protected:
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(__Vc7AutomationHelper_H__)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -