📄 vc6automationhelper.h
字号:
/************************************************************************
*
* Resource ID Organiser Add-In for Visual C++
*
* (c) Copyright 2000-2005 by Riverblade Limited (UK). All rights reserved.
*
************************************************************************
*
* Description : CVc6AutomationHelper - Visual Studio COM interface
* wrapper class
*
* Compiler : Microsoft Visual C++ 6.0, Service Pack 3 or later
*
* Target
* Environment : Windows 2000/XP/Vista;
* Visual Studio 5.0 or 6.0
*
* 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/ResOrgAddIn/Vc6AutomationHelper.h $
* $Revision: 11 $
* $Date: 22/10/05 17:24 $
* $Author: Anna $
*
* $History: Vc6AutomationHelper.h $
*
* ***************** Version 11 *****************
* User: Anna Date: 22/10/05 Time: 17:24
* Updated in $/Projects/AddIns/ResOrg/ResOrgAddIn
* Corrected a typo
*
* ***************** Version 10 *****************
* User: Anna Date: 22/10/05 Time: 17:04
* Updated in $/Projects/AddIns/ResOrg/ResOrgAddIn
* Moved CVc6AutomationHelper from the ResOrgCore module to ResOrgAddIn.
*
* ***************** Version 8 *****************
* User: Anna Date: 15/04/03 Time: 20:32
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* 1. Removed unnecessary file guards (#pragma once works well enough)
* 2. Updated file banners
*
* ***************** Version 7 *****************
* User: Anna Date: 25/11/02 Time: 15:20
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Changed website address in banner
*
* ***************** Version 6 *****************
* User: Anna Date: 22/10/02 Time: 13:24
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Changed name/mail address (at last!)
*
* ***************** Version 5 *****************
* User: Andy Date: 2/08/02 Time: 17:01
* Updated in $/Projects/AddIns/ResOrg/ResOrgCore
* Renamed class from CWorkspaceHelper to CVc6AutomationHelper, and moved
* it to the ResOrgCore module
*
* ***************** Version 3 *****************
* User: Andy Date: 2/03/01 Time: 13:14
* Updated in $/Projects/AddIns/ResOrg/ResOrgAddIn
* Removed CVc6AutomationHelper::GetSymbolFileName() [now a global function in
* ResOrgUtils]
*
* ***************** Version 2 *****************
* User: Andy Date: 29/11/00 Time: 18:37
* Updated in $/Projects/AddIns/ResOrg/ResOrgAddIn
* 1. Moved Office2KDlg code to its own DLL
* 2. Added file banners
*
* $Nokeywords: $
*
************************************************************************/
#pragma once
#include <atlbase.h>
//#include <atlcom.h>
// Developer Studio Object Model
#include <ObjModel\addauto.h>
#include <ObjModel\appdefs.h>
#include <ObjModel\appauto.h>
#include <ObjModel\blddefs.h>
#include <ObjModel\bldauto.h>
#include <ObjModel\textdefs.h>
#include <ObjModel\textauto.h>
#include <ObjModel\dbgdefs.h>
#include <ObjModel\dbgauto.h>
typedef CTypedPtrArray<CPtrArray, IGenericProject*> CProjectArray;
typedef CTypedPtrArray<CPtrArray, IGenericDocument*> CDocumentArray;
/////////////////////////////////////////////////////////////////////////////
// CVc6AutomationHelper command target
class CVc6AutomationHelper : public CObject
{
public:
CVc6AutomationHelper(IApplication* pApplication = NULL);
virtual ~CVc6AutomationHelper(void);
// Attributes
protected:
IApplication* m_pApplication;
// Operations
public:
/////////////////////////////////////////////////////////////////////////////
// Application
IApplication* GetApplication(void) const
{ return m_pApplication; }
BOOL SetApplication(IApplication* pApplication);
/////////////////////////////////////////////////////////////////////////////
// Projects
int GetProjectCount(void) const;
int GetProjectNames(CStringArray& rarrayNames) const;
int GetProjects(CProjectArray& rarrayProjects) const;
IGenericProject* GetActiveProject(void) const;
IGenericProject* GetProject(const CString& sFullName) const;
static CString GetName(IGenericProject* pProject);
static CString GetFullName(IGenericProject* pProject);
BOOL SetActiveProject(IGenericProject* pActiveProject);
BOOL LoadProject(IGenericProject* pProject);
BOOL UnloadProject(IGenericProject* pProject);
/////////////////////////////////////////////////////////////////////////////
// Documents (open files)
int GetDocumentCount(void) const;
int GetDocumentNames(CStringArray& rarrayNames) const;
int GetDocuments(CDocumentArray& rarrayDocuments) const;
IGenericDocument* GetDocument(const CString& sFullName) const;
static CString GetName(IGenericDocument* pDocument);
static CString GetFullName(IGenericDocument* 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.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -